Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Native compile on arm gives me "libavutil/avutil.h": File does not exist" #322

Closed
mpandrews2000 opened this issue Nov 22, 2016 · 8 comments
Assignees
Labels

Comments

@mpandrews2000
Copy link

Hi,

I'm trying to do a native ARM build on a Jetson TK1, bt I can't get around the error:

[INFO] Targeting /home/ubuntu/builds/javacpp-presets/ffmpeg/src/main/java/org/bytedeco/javacpp/avcodec.java
[ERROR] Failed to execute JavaCPP Builder: Could not parse "libavutil/avutil.h": File does not exist

even though libavutil/avutil.h is clearly under the ffmpeg directory.

Any help would be greatly appreciated.

@saudet
Copy link
Member

saudet commented Nov 23, 2016 via email

@mpandrews2000
Copy link
Author

mpandrews2000 commented Nov 23, 2016

Hi

I am not tying to cross compile, I am trying to compile directly on the TK1.

@saudet
Copy link
Member

saudet commented Nov 24, 2016 via email

@saudet
Copy link
Member

saudet commented Nov 26, 2016

@vb216 Any comments about this?

@vb216
Copy link
Member

vb216 commented Nov 26, 2016

Cool board, not seen that one before. Will take a look.. I did have in mind, that it could be a good idea to rework the armhf build so that it would compile natively on arm and have some aliases/symlinks in the cross compile docker so that the same build carries on working there too

@saudet saudet reopened this Nov 27, 2016
@vb216
Copy link
Member

vb216 commented Nov 28, 2016

Getting there.. so far only real changes have been to ffmpeg cppbuild.sh. OpenBLAS took a long time to build, and spotted something up with the flags - multiple definitions of march and mfpu, looks like it picks up both definitions of platform.compiler.fastfpu and platform.compiler.default ? It's not a problem as such as still builds, just seems odd and less certainty over which are definitely going to be used

[INFO] g++ -I/home/pi/javacpp-presets/openblas/cppbuild/linux-armhf/include/ -I/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/include -I/usr/lib/jvm/jdk-8-oracle-arm32-vfp-hflt/include/linux /home/pi/javacpp-presets/openblas/target/classes/org/bytedeco/javacpp/jniopenblas.cpp -march=armv6 -mfpu=vfp -mfloat-abi=hard -O3 -s -march=armv7-a -mfpu=neon -mfloat-abi=hard -ffast-math -Wl,-rpath,$ORIGIN/ -Wl,-z,noexecstack -Wl,-Bsymbolic -Wall -fPIC -shared -o libjniopenblas.so -L/home/pi/javacpp-presets/openblas/cppbuild/linux-armhf/lib/ -Wl,-rpath,/home/pi/javacpp-presets/openblas/cppbuild/linux-armhf/lib/ -lopenblas

saudet pushed a commit that referenced this issue Nov 30, 2016
 * Fix FFmpeg builds on ARM when not using a cross compiler (issue #322)
@vb216
Copy link
Member

vb216 commented Nov 30, 2016

Should build natively on Arm (hard float) OK now, I've tested it on a Pi3 here:
mvn install -Djavacpp.platform=linux-armhf -Dmaven.javadoc.skip=true

You might need to add some swap depending on how much memory you have, for openblas needs around 2GB it seems, and add in the usual dependencies. I need to update the wiki build instructions, as you can now either grab the public docker image and cross compile straight away, or add required build tools and libs and build native now.

@saudet saudet added bug and removed question labels Dec 2, 2016
@saudet
Copy link
Member

saudet commented Dec 9, 2016

Fix included in version 1.3, enjoy!

Thanks for the fix @vb216 :)

@saudet saudet closed this as completed Dec 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants