Hi! > ------------------------------------------------------------------------------------------------------------------ > > /usr/local/arm/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -g -O2 -g -O2 > -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 > -I/home/user/test_apps/ltp/arm/ltp-full-20130904/testcases/kernel/include > -I../../../../include -I../../../../include -static -L../../../../lib > mq_notify01.c -lltp -lpthread -lrt -o mq_notify01 > > ---------------------------------------------------------------------------------------------------------------- > > obviously I get the same error, but if I rearrange the pthread linker flag > at the last as follows > > ----------------------------------------------------------------------------------------------------------------- > > /usr/local/arm/arm-2009q3/bin/arm-none-linux-gnueabi-gcc -g -O2 -g -O2 > -fno-strict-aliasing -pipe -Wall -D_FORTIFY_SOURCE=2 > -I/home/user/test_apps/ltp/arm/ltp-full-20130904/testcases/kernel/include > -I../../../../include -I../../../../include -static -L../../../../lib > mq_notify01.c -lltp -lrt -o mq_notify01 -lpthread > > --------------------------------------------------------------------------------------------------------------- > > The compilation succeeds now
You are hitting a linker order problem here. The -lrt introduces mq_notify() that uses pthread_once() which is not found in any of the libraries on the right side after the -lrt. So the right order here is '-lltp -lrt -lpthread -o mq_notify01'. You can fix this one with just changing the order in the Makefile in the corresponding directory. Then retry the compilation, find other problems, if there are any and fix them one by one. And ideally send a patch after that :) -- Cyril Hrubis [email protected] ------------------------------------------------------------------------------ Shape the Mobile Experience: Free Subscription Software experts and developers: Be at the forefront of tech innovation. Intel(R) Software Adrenaline delivers strategic insight and game-changing conversations that shape the rapidly evolving mobile landscape. Sign up now. http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
