Re: [AD] i386 flag

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sat March 14 2009, Milan Mimica wrote:
> I get this error when compiling with -march=i386 flag:
>
>
> Linking CXX executable demo
> cd /home/mimix/Documents/4.9/build/demo && /usr/local/bin/cmake -E
> cmake_link_script CMakeFiles/demo.dir/link.txt --verbose=1
> /usr/local/bin/g++-4.3.2 -march=i386 -W -Wall -O3 -DNDEBUG -fPIC
> CMakeFiles/demo.dir/src/Asteroid.cpp.o
> CMakeFiles/demo.dir/src/BitmapResource.cpp.o
> CMakeFiles/demo.dir/src/Bullet.cpp.o
> CMakeFiles/demo.dir/src/ButtonWidget.cpp.o
> CMakeFiles/demo.dir/src/Debug.cpp.o
> CMakeFiles/demo.dir/src/DisplayResource.cpp.o
> CMakeFiles/demo.dir/src/Enemy.cpp.o CMakeFiles/demo.dir/src/Entity.cpp.o
> CMakeFiles/demo.dir/src/Error.cpp.o CMakeFiles/demo.dir/src/Explosion.cpp.o
> CMakeFiles/demo.dir/src/GUI.cpp.o
> CMakeFiles/demo.dir/src/GenericResource.cpp.o
> CMakeFiles/demo.dir/src/Input.cpp.o
> CMakeFiles/demo.dir/src/LargeAsteroid.cpp.o
> CMakeFiles/demo.dir/src/LargeBullet.cpp.o
> CMakeFiles/demo.dir/src/LargeSlowBullet.cpp.o
> CMakeFiles/demo.dir/src/MediumAsteroid.cpp.o
> CMakeFiles/demo.dir/src/Misc.cpp.o CMakeFiles/demo.dir/src/Player.cpp.o
> CMakeFiles/demo.dir/src/PowerUp.cpp.o
> CMakeFiles/demo.dir/src/Resource.cpp.o
> CMakeFiles/demo.dir/src/ResourceManager.cpp.o
> CMakeFiles/demo.dir/src/SampleResource.cpp.o
> CMakeFiles/demo.dir/src/StreamResource.cpp.o
> CMakeFiles/demo.dir/src/SmallAsteroid.cpp.o
> CMakeFiles/demo.dir/src/SmallBullet.cpp.o CMakeFiles/demo.dir/src/UFO.cpp.o
> CMakeFiles/demo.dir/src/a5teroids.cpp.o
> CMakeFiles/demo.dir/src/collision.cpp.o CMakeFiles/demo.dir/src/logic.cpp.o
> CMakeFiles/demo.dir/src/render.cpp.o CMakeFiles/demo.dir/src/sound.cpp.o
> CMakeFiles/demo.dir/src/wave.cpp.o -o demo -rdynamic
> ../lib/liba5_font-static-4.9.9.a ../lib/liba5_iio-static-4.9.9.a
> ../lib/liba5_acodec-static-4.9.9.a ../lib/libkcm_audio-static-4.9.9.a
> ../lib/liballegro-static-4.9.9.a -lpng -lz -ljpeg -lFLAC -lvorbisfile
> -lvorbis -logg -lsndfile -lopenal -lasound -lm -lpthread -lSM -lICE -lX11
> -lXext -lXcursor -lXxf86vm -lXinerama -lXpm -lGL -lGLU
> CMakeFiles/demo.dir/src/BitmapResource.cpp.o: In function
> `BitmapResource::BitmapResource(char const*)':
> BitmapResource.cpp:(.text+0x14d): undefined reference to
> `__sync_fetch_and_add_4' CMakeFiles/demo.dir/src/BitmapResource.cpp.o: In
> function
> `BitmapResource::BitmapResource(char const*)':
> BitmapResource.cpp:(.text+0x211): undefined reference to
> `__sync_fetch_and_add_4' CMakeFiles/demo.dir/src/BitmapResource.cpp.o: In
> function
> `BitmapResource::~BitmapResource()':
> BitmapResource.cpp:(.text._ZN14BitmapResourceD0Ev[BitmapResource::~BitmapRe
>source()]+0x4b): undefined reference to `__sync_fetch_and_add_4'
> CMakeFiles/demo.dir/src/BitmapResource.cpp.o: In function
> `BitmapResource::~BitmapResource()':
> BitmapResource.cpp:(.text._ZN14BitmapResourceD1Ev[BitmapResource::~BitmapRe
>source()]+0x3f): undefined reference to `__sync_fetch_and_add_4'
> CMakeFiles/demo.dir/src/Error.cpp.o: In function `Error::Error(char
> const*)': Error.cpp:(.text+0x8c): undefined reference to
> `__sync_fetch_and_add_4'
> CMakeFiles/demo.dir/src/Error.cpp.o:Error.cpp:(.text+0x134): more undefined
> references to `__sync_fetch_and_add_4' follow
> collect2: ld returned 1 exit status
> make[2]: *** [demo/demo] Error 1
> make[2]: Leaving directory `/home/mimix/Documents/4.9/build'
> make[1]: *** [demo/CMakeFiles/demo.dir/all] Error 2
> make[1]: Leaving directory `/home/mimix/Documents/4.9/build'
> make: *** [all] Error 2
>


Oh lovely. I think we need to detect those functions with cmake now, just to be on the safe side. A simple assumption in the CPP checks isn't going to be enough.


> --
> Milan Mimica
> http://sparklet.sf.net




--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/