如何构建Xuggle Xuggler的GPL和LGPL版本? [英] How can I build the GPL and LGPL version of Xuggle Xuggler?

查看:419
本文介绍了如何构建Xuggle Xuggler的GPL和LGPL版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有特定的步骤,我可以采取从Windows 32位,Windows 64位,Linux 32位和Linux 64位构建Xuggle Xuggler源代码?我已在多个系统上尝试过多次,并且会收到许多不同的错误。

Are there specific steps I can take to build the Xuggle Xuggler source code from Windows 32-bit, Windows 64-bit, Linux 32-bit, and Linux 64-bit? I've tried multiple times on multiple systems and keep getting lots of different errors.

更新


我花了几天试图让Xuggle Xuggler编译(和
交叉编译)。我成功地解决了原始GPL
版本的代码和LGPL版本。我想我会在Stack Overflow上发布一个
的回答来分享我的知识。

I spent several days trying to get Xuggle Xuggler to compile (and cross-compile). I successfully tackled compiling both the original GPL version of the code and an LGPL version. I thought I'd post an answer to my own question on Stack Overflow to share my knowledge.

Raspberry Pi更新


我还可以按照以下相同的基本说明在Raspberry Pi上构建和运行Xuggler。我只是使用
我的LGPL版本的代码,我在Github上维护,并对Pi进行了修改。我可以使用编译的JAR文件和二进制文件在我的Radxa Rock(另一个ARM设备)。如果你在建立Pi时感兴趣的是
,你可以使用我的pi分支:

I was also able to build and run Xuggler on the Raspberry Pi following these same basic instructions below. I just used my LGPL version of the code that I maintain on Github, and made modifications for the Pi. I can use the compiled JAR file and binaries on my Radxa Rock (another ARM device) too. If you're interested in building on the Pi, you can use my pi branch:

https://github.com/ed/xuggle-xuggler

如果您是惰性的,只需要Pi / ARM的预编译的.jar文件:

If you are lazy and just want the precompiled .jar files for the Pi/ARM:

GPL版本(支持H.264)

LGPL版本(无H.264支持)


推荐答案

这是我在已发布的Google文档中的答案的格式化版本

为了完整性(如果链接死了一天),这里是格式不太好的文本:

For completeness (and in case the link goes dead one day), here is less-nicely-formatted text:

构建Xuggle Xuggler LGPL许可版本)

[Linux 32位,Linux 64位,Windows 32位,Windows 64位]

[Linux 32-bit, Linux 64-bit, Windows 32-bit, Windows 64-bit]

要构建Xuggle Xuggler库,您将需要两个运行Ubuntu 11.10(32位和64位操作系统)的Linux虚拟机。需要32位版本的操作系统来构建Linux 32位,交叉编译Windows 32位和交叉编译Windows 64位二进制文​​件。需要64位版本的操作系统来构建Linux 64位二进制文​​件。

To build the Xuggle Xuggler library, you will need two Linux virtual machines running Ubuntu 11.10 (32-bit and 64-bit operating systems). A 32-bit version of the OS is required to build Linux 32-bit, cross compiling Windows 32-bit, and cross compiling Windows 64-bit binaries. A 64-bit version of the OS is required to build Linux 64-bit binaries.

使用VirtualBox,我使用ubuntu-11.10-server-i386.iso和ubuntu-11.10-server-amd64.iso磁盘映像创建了上面讨论的两个虚拟机。这些是Ubuntu的无头服务器版本。安装操作系统后,请按照以下步骤构建Xuggler(欢迎尝试不同的依赖关系版本,而不是使用root用户,但这是我成功构建的):

Using VirtualBox, I created the two virtual machines discussed above with the ubuntu-11.10-server-i386.iso and ubuntu-11.10-server-amd64.iso disk images. These are headless server versions of Ubuntu. After installation of the OS, follow these steps to build Xuggler (you are welcome to try different dependency versions and not use the root user, but this is what I did to build successfully):

更改为root用户:

sudo su

只需使用root的主目录:

Just use root’s home directory:

cd /root

更新apt-get以使用特定存储库:

Update apt-get to use specific repository:

apt-get install python-software-properties
add-apt-repository ppa:ferramroberto/java
apt-get update

安装Java:

apt-get install sun-java6-jdk sun-java6-plugin

验证HotSpot Java 6 JVM是默认的java:

Verify the HotSpot Java 6 JVM is the default java:

java -version


b $ b

如果出现不正确的Java版本,请运行以下命令配置默认值:

If the incorrect version of Java appears, configure the default by running:

update-alternatives --config java

安装gcc,g ++,make和所有其他构建要素:

Install gcc, g++, make and all the other build essentials:

apt-get install build-essential

安装YASM:

apt-get install yasm

安装Open SSL:

Install Open SSL:

apt-get install openssl

安装软件包配置:

apt-get install pkg-config

安装Git:

apt-get install git

安装Ant:

apt-get install ant-optional

安装JUnit:

apt-get install junit

安装MingGW以能够为Windows构建(mingw-w64可以做32和64位Windows) p>

Install MingGW to be able to build for Windows (mingw-w64 can do 32 and 64-bit Windows):

apt-get install mingw-w64

下载LGPL配置的Xuggle源代码(Ed's fork of the code from Jeff Wallace's fork from the original GPL xuggle code)或原始GPL版本:

Download the LGPL configured Xuggle source code (Ed’s fork of the code from Jeff Wallace’s fork from the original GPL xuggle code) or the original GPL version:

LGPL: git clone https://github.com/e-d/xuggle-xuggler.git
GPL: git clone https://github.com/xuggle/xuggle-xuggler.git 

编译和构建JAR文件(二进制文件)。确保在64位版本的Ubuntu上运行64位Linux构建。还要注意,在构建之间,您将需要运行ant clobber来删除所有的编译文件从以前的架构。要构建运行:

Compile and build the JAR files (with binaries inside). Be sure to run the 64-bit Linux build on the 64-bit version of Ubuntu. Also note that between builds you will need to run "ant clobber" to remove all of the compiled files from the previous architecture. To build run:

(32/64-bit Linux): ant stage
(64-bit Windows): ant -Dbuild.configure.os=x86_64-w64-mingw32 stage
(32-bit Windows): ant -Dbuild.configure.os=i686-w64-mingw32 stage

JAR文件将位于/ dist / lib目录中。

The JAR files will be in the /dist/lib directory.

Linux二进制文件在CentOS上工作,现在需要将GCC和G ++的版本更改为使用3.4而不是3.6。

If you need the Linux binaries to additionally work on CentOS, you’ll now need to change the version of GCC and G++ to use 3.4 instead of 3.6.

安装GCC 4.4:

apt-get install gcc-4.4

更新符号链接以使用4.4(32位VM上的arch特定链接将有所不同) :

Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):

rm /usr/bin/gcc
ln -s /usr/bin/gcc-4.4 /usr/bin/gcc
rm /usr/bin/x86_64-linux-gnu-gcc
ln -s /usr/bin/x86_64-linux-gnu-gcc-4.4 /usr/bin/x86_64-linux-gnu-gcc

安装C ++(G ++)4.4:

Install C++ (G++) 4.4:

apt-get install c++-4.4

要使用的符号链接4.4(在32位VM上,arch特定链接将有所不同):

Update symbolic links to use 4.4 (the arch-specific link will be different on 32-bit VM):

rm /usr/bin/cpp
ln -s /usr/bin/cpp-4.4 /usr/bin/cpp
rm /usr/bin/x86_64-linux-gnu-cpp
ln -s /usr/bin/x86_64-linux-gnu-cpp-4.4 /usr/bin/x86_64-linux-gnu-cpp
rm /usr/bin/g++
ln -s /usr/bin/g++-4.4 /usr/bin/g++
rm /usr/bin/x86_64-linux-gnu-g++
ln -s /usr/bin/x86_64-linux-gnu-g++-4.4 /usr/bin/x86_64-linux-gnu-g++

验证默认版本:

gcc --version
c++ --version
cpp --version
gcc --version

您现在可以像以前一样运行构建(您只需要重新构建Linux二进制文件)。二进制文件现在将与许多Linux发行版的略旧版本兼容(包括CentOS兼容性)。这些4.4编译的二进制文件应该仍然工作在任何地方4.6编译版本也将运行。

You can now run the builds the same way as before (you only need to re-build Linux binaries). The binaries will now be compatible with slightly older versions of many Linux distros (including CentOS compatibility). These 4.4 compiled binaries should still work everywhere the 4.6 compiled versions would run too.

特别感谢这个博客,指向我正确的方向,并给我大多数我上面详细。

Special thanks to this blog for pointing me in the right direction and giving me the majority of what I detailed above.

这篇关于如何构建Xuggle Xuggler的GPL和LGPL版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆