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

build ffmpeg error on macos #775

Open
yijinsheng opened this issue Aug 27, 2024 · 2 comments
Open

build ffmpeg error on macos #775

yijinsheng opened this issue Aug 27, 2024 · 2 comments

Comments

@yijinsheng
Copy link

i want to compile the ffmpeg on my macos, I use the command

mvn install --projects .,ffmpeg -Djavacpp.platform.extension=-gpl

and I get the error message
ld: warning: -single_module is obsolete ld: warning: ignoring duplicate libraries: '-lm' ld: multiple errors: unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/cpuid.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/cpuid.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/fixed_dsp.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/fixed_dsp.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/float_dsp.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/float_dsp.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/imgutils.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/imgutils.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/lls.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/lls.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/pixelutils.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/pixelutils.o'; unknown platform in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/tx_float.o' in '/Users/yijinsheng/temp/javacpp-presets/ffmpeg/cppbuild/macosx-x86_64-gpl/ffmpeg-6.1.1/libavutil/x86/tx_float.o' clang: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [libavutil/libavutil.58.dylib] Error 1 make: *** Waiting for unfinished jobs.... [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary: [INFO] [INFO] JavaCPP Presets 1.5.10 ............................. SUCCESS [ 1.293 s] [INFO] JavaCPP Presets for FFmpeg 6.1.1-1.5.10 ............ FAILURE [10:12 min] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 10:15 min [INFO] Finished at: 2024-08-26T19:48:31+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.bytedeco:javacpp:1.5.10:build (javacpp-cppbuild-install) on project ffmpeg: Execution javacpp-cppbuild-install of goal org.bytedeco:javacpp:1.5.10:build failed: Process exited with an error: 2 -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException [ERROR] [ERROR] After correcting the problems, you can resume the build with the command [ERROR] mvn <args> -rf :ffmpeg
can any one help me

@saudet
Copy link
Member

saudet commented Sep 1, 2024

Are you sure your C++ toolchain is for the same architecture as your JVM?

@yijinsheng
Copy link
Author

Are you sure your C++ toolchain is for the same architecture as your JVM?
this is what I get ,anything wrong with me,or anything else i need to confirm

Apple clang version 15.0.0 (clang-1500.3.9.4)
Target: x86_64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode)

My macos is powered by an Intel chip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
@saudet @yijinsheng and others