Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » [OS X Error] missing required architecture x86_64 in file

This thread is locked; no one can reply to it. rss feed Print
[OS X Error] missing required architecture x86_64 in file
Kibiz0r
Member #6,203
September 2005
avatar

Ah, configuration problems...

Building on Snow Leopard. All required ports are installed, or at least CMake says they are.

Michael-Harringtons-MacBook-Pro:build kibiyama$ make
[ 17%] Built target allegro
[ 20%] Built target allegro_primitives
[ 23%] Built target allegro_image
[ 24%] Built target allegro_font
[ 29%] Built target allegro_audio
[ 29%] Built target allegro_flac
[ 30%] Built target allegro_vorbis
[ 30%] Built target allegro_ttf
[ 30%] Built target allegro_color
[ 30%] Built target allegro_memfile
Linking C shared library ../../lib/liballegro_physfs-4.9.16.dylib
ld: warning: duplicate dylib /usr/lib/libz.1.dylib
ld: in /usr/lib/libncurses.5.dylib, missing required architecture x86_64 in file
collect2: ld returned 1 exit status
make[2]: *** [lib/liballegro_physfs-4.9.16.dylib] Error 1
make[1]: *** [addons/physfs/CMakeFiles/allegro_physfs.dir/all] Error 2
make: *** [all] Error 2

Any suggestions would be appreciated.

Trent Gamblin
Member #261
April 2000
avatar

I don't get it. Allegro doesn't require ncurses.

Peter Wang
Member #23
April 2000

Try make VERBOSE=1 and post the output.

Kibiz0r
Member #6,203
September 2005
avatar

"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -H/Users/kibiyama/svn/allegro5 -B/Users/kibiyama/svn/allegro5/build --check-build-system CMakeFiles/Makefile.cmake 0
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_start /Users/kibiyama/svn/allegro5/build/CMakeFiles /Users/kibiyama/svn/allegro5/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make -f CMakeFiles/allegro.dir/build.make CMakeFiles/allegro.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/CMakeFiles/allegro.dir/DependInfo.cmake --color=
make -f CMakeFiles/allegro.dir/build.make CMakeFiles/allegro.dir/build
make[2]: Nothing to be done for `CMakeFiles/allegro.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
[ 17%] Built target allegro
make -f addons/primitives/CMakeFiles/allegro_primitives.dir/build.make addons/primitives/CMakeFiles/allegro_primitives.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/primitives /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/primitives /Users/kibiyama/svn/allegro5/build/addons/primitives/CMakeFiles/allegro_primitives.dir/DependInfo.cmake --color=
make -f addons/primitives/CMakeFiles/allegro_primitives.dir/build.make addons/primitives/CMakeFiles/allegro_primitives.dir/build
make[2]: Nothing to be done for `addons/primitives/CMakeFiles/allegro_primitives.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  29 30 31
[ 20%] Built target allegro_primitives
make -f addons/image/CMakeFiles/allegro_image.dir/build.make addons/image/CMakeFiles/allegro_image.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/image /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/image /Users/kibiyama/svn/allegro5/build/addons/image/CMakeFiles/allegro_image.dir/DependInfo.cmake --color=
make -f addons/image/CMakeFiles/allegro_image.dir/build.make addons/image/CMakeFiles/allegro_image.dir/build
make[2]: Nothing to be done for `addons/image/CMakeFiles/allegro_image.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  25 26 27
[ 23%] Built target allegro_image
make -f addons/font/CMakeFiles/allegro_font.dir/build.make addons/font/CMakeFiles/allegro_font.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/font /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/font /Users/kibiyama/svn/allegro5/build/addons/font/CMakeFiles/allegro_font.dir/DependInfo.cmake --color=
make -f addons/font/CMakeFiles/allegro_font.dir/build.make addons/font/CMakeFiles/allegro_font.dir/build
make[2]: Nothing to be done for `addons/font/CMakeFiles/allegro_font.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  24
[ 24%] Built target allegro_font
make -f addons/audio/CMakeFiles/allegro_audio.dir/build.make addons/audio/CMakeFiles/allegro_audio.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/audio /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/audio /Users/kibiyama/svn/allegro5/build/addons/audio/CMakeFiles/allegro_audio.dir/DependInfo.cmake --color=
make -f addons/audio/CMakeFiles/allegro_audio.dir/build.make addons/audio/CMakeFiles/allegro_audio.dir/build
make[2]: Nothing to be done for `addons/audio/CMakeFiles/allegro_audio.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  18 19 20 21 22
[ 29%] Built target allegro_audio
make -f addons/acodec/CMakeFiles/allegro_flac.dir/build.make addons/acodec/CMakeFiles/allegro_flac.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/acodec /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/acodec /Users/kibiyama/svn/allegro5/build/addons/acodec/CMakeFiles/allegro_flac.dir/DependInfo.cmake --color=
make -f addons/acodec/CMakeFiles/allegro_flac.dir/build.make addons/acodec/CMakeFiles/allegro_flac.dir/build
make[2]: Nothing to be done for `addons/acodec/CMakeFiles/allegro_flac.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles 
[ 29%] Built target allegro_flac
make -f addons/acodec/CMakeFiles/allegro_vorbis.dir/build.make addons/acodec/CMakeFiles/allegro_vorbis.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/acodec /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/acodec /Users/kibiyama/svn/allegro5/build/addons/acodec/CMakeFiles/allegro_vorbis.dir/DependInfo.cmake --color=
make -f addons/acodec/CMakeFiles/allegro_vorbis.dir/build.make addons/acodec/CMakeFiles/allegro_vorbis.dir/build
make[2]: Nothing to be done for `addons/acodec/CMakeFiles/allegro_vorbis.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles  32
[ 30%] Built target allegro_vorbis
make -f addons/ttf/CMakeFiles/allegro_ttf.dir/build.make addons/ttf/CMakeFiles/allegro_ttf.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/ttf /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/ttf /Users/kibiyama/svn/allegro5/build/addons/ttf/CMakeFiles/allegro_ttf.dir/DependInfo.cmake --color=
make -f addons/ttf/CMakeFiles/allegro_ttf.dir/build.make addons/ttf/CMakeFiles/allegro_ttf.dir/build
make[2]: Nothing to be done for `addons/ttf/CMakeFiles/allegro_ttf.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles 
[ 30%] Built target allegro_ttf
make -f addons/color/CMakeFiles/allegro_color.dir/build.make addons/color/CMakeFiles/allegro_color.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/color /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/color /Users/kibiyama/svn/allegro5/build/addons/color/CMakeFiles/allegro_color.dir/DependInfo.cmake --color=
make -f addons/color/CMakeFiles/allegro_color.dir/build.make addons/color/CMakeFiles/allegro_color.dir/build
make[2]: Nothing to be done for `addons/color/CMakeFiles/allegro_color.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles 
[ 30%] Built target allegro_color
make -f addons/memfile/CMakeFiles/allegro_memfile.dir/build.make addons/memfile/CMakeFiles/allegro_memfile.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/memfile /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/memfile /Users/kibiyama/svn/allegro5/build/addons/memfile/CMakeFiles/allegro_memfile.dir/DependInfo.cmake --color=
make -f addons/memfile/CMakeFiles/allegro_memfile.dir/build.make addons/memfile/CMakeFiles/allegro_memfile.dir/build
make[2]: Nothing to be done for `addons/memfile/CMakeFiles/allegro_memfile.dir/build'.
"/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_progress_report /Users/kibiyama/svn/allegro5/build/CMakeFiles 
[ 30%] Built target allegro_memfile
make -f addons/physfs/CMakeFiles/allegro_physfs.dir/build.make addons/physfs/CMakeFiles/allegro_physfs.dir/depend
cd /Users/kibiyama/svn/allegro5/build && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_depends "Unix Makefiles" /Users/kibiyama/svn/allegro5 /Users/kibiyama/svn/allegro5/addons/physfs /Users/kibiyama/svn/allegro5/build /Users/kibiyama/svn/allegro5/build/addons/physfs /Users/kibiyama/svn/allegro5/build/addons/physfs/CMakeFiles/allegro_physfs.dir/DependInfo.cmake --color=
make -f addons/physfs/CMakeFiles/allegro_physfs.dir/build.make addons/physfs/CMakeFiles/allegro_physfs.dir/build
Linking C shared library ../../lib/liballegro_physfs-4.9.16.dylib
cd /Users/kibiyama/svn/allegro5/build/addons/physfs && "/Applications/CMake 2.8-0.app/Contents/bin/cmake" -E cmake_link_script CMakeFiles/allegro_physfs.dir/link.txt --verbose=1
/usr/bin/gcc   -mmacosx-version-min=10.6  -fno-common -msse -W -Wall  -O2 -g -dynamiclib -headerpad_max_install_names -flat_namespace -undefined suppress -o ../../lib/liballegro_physfs-4.9.16.dylib -install_name /Users/kibiyama/svn/allegro5/build/lib/liballegro_physfs-4.9.16.dylib CMakeFiles/allegro_physfs.dir/a5_physfs.c.o CMakeFiles/allegro_physfs.dir/a5_physfs_dir.c.o ../../lib/liballegro-4.9.16.dylib /opt/local/lib/libphysfs.dylib -framework AppKit -framework IOKit -framework OpenGL -framework AGL 
ld: warning: duplicate dylib /usr/lib/libz.1.dylib
ld: in /usr/lib/libncurses.5.dylib, missing required architecture x86_64 in file
collect2: ld returned 1 exit status
make[2]: *** [lib/liballegro_physfs-4.9.16.dylib] Error 1
make[1]: *** [addons/physfs/CMakeFiles/allegro_physfs.dir/all] Error 2
make: *** [all] Error 2

Peter Wang
Member #23
April 2000

I don't see any -lncurses on that line, so my guess is that somehow your /opt/local/lib/libphysfs.dylib is linking with ncurses for some reason, and ncurses is not compiled for x86_64. Maybe you can verify it. I think the command is something like otool -L <lib>.

Evert
Member #794
November 2000
avatar

The file command will list the available architectures for an executable or a library.
I had to re-compile and re-install most of the things I had installed through MacPorts after upgrading to Snow Leopard, and you're actually recommended to do that if you haven't done so yet. Bit of a pain, but after that everything worked again.
You may want to set things up to compile "fat" binaries for i386 and x86_64.

Kibiz0r
Member #6,203
September 2005
avatar

Hm. I didn't upgrade to Snow Leopard, this is a new laptop. I will take a look later tonight and see what I can come up with. Thanks for the help so far, guys.

Trent Gamblin
Member #261
April 2000
avatar

I think I found the problem, after installing physfs from macports. Apparently it depends on readline which depends on ncurses but gcc finds /usr/lib/ncurses instead of the macports one by default. Solution is to build physfs manually without readline as a dependancy (not sure why it needs it anyway). Better solution would be to somehow get cmake to link with the macports ncurses but I didn't waste my time finding out how. Maybe somebody knows.

Peter Wang
Member #23
April 2000

It seems like a test program in physfs can use readline, but in no way should that mean the library depends on readline. That sounds like a bug in MacPorts. Someone should report it.

Trent Gamblin
Member #261
April 2000
avatar

I just reported it.

Go to: