1

I have issues building ace 5.3 in linux. I get the following error.

g++ -W -Wall -Wpointer-arith -pipe -O3 -g -Wno-uninitialized -fno-implicit-templates   -DACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION -D_POSIX_THREADS -D_POSIX_THREAD_SAFE_FUNCTIONS -D_REENTRANT   -I/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers -DACE_HAS_EXCEPTIONS  -L/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace -L./ -o gperf .obj/gperf.o .obj/Options.o .obj/Iterator.o .obj/Gen_Perf.o .obj/Key_List.o .obj/List_Node.o .obj/Hash_Table.o .obj/Bool_Array.o .obj/Vectors.o .obj/Version.o  -lACE -ldl -lpthread
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_return'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_read'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_cancel'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_error'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_write'
/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/ace/libACE.so: undefined reference to `aio_suspend'
collect2: ld returned 1 exit status
make[2]: *** [gperf] Error 1
make[2]: Leaving directory `/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/apps/gperf/src'
make[1]: *** [src.subdir] Error 2
make[1]: Leaving directory `/home/vwickram/Ubuntu_Release/tmp/ACE_wrappers/apps/gperf'
make: *** [all.nested] Error 2

When I googled I found out it is a bug in ace5.3 and it is fixed in later versions. So I got the ace 6.3 version and managed to build in linux. However, ace 6.3 wouldn't build in SolarisX86 with sunstudio 11 compiler. I get the following.

ACE::Monitor_Control::Monitor_Point_Registry*ACE_Singleton<ACE::Monitor_Control::Monitor_Point_Registry,ACE_Thread_Mutex>::instance() /home/vwickram/Ubuntu_Release/ace6.3/tmp/ACE_wrappers/lib/libACE.so
ld: fatal: Symbol referencing errors. No output written to ace_gperf
gmake[1]: *** [ace_gperf] Error 1
gmake[1]: Leaving directory `/home/vwickram/Ubuntu_Release/ace6.3/tmp/ACE_wrappers/apps/gperf/src'
gmake: *** [gperf] Error 2

Could someone help please? I would still prefer using ace 5.3 version and use a patch to fix the bug and make it build on linux.

user3484214
  • 41
  • 1
  • 1
  • 3
  • A better place to ask this question is the ACE mailing list, see http://www.cs.wustl.edu/~schmidt/ACE-mail.html. Not sure about the problem with the sunstudio compiler, have you tried gcc on Solaris? – Johnny Willemsen Jan 09 '15 at 07:52
  • The warning on Solaris has Ubuntu as directory, is that the real error you get? – Johnny Willemsen Jan 09 '15 at 10:54

2 Answers2

1

I faced a similar issue on ubuntu 14.04 for Ace 5.5.

I checked the whole console log and it couldnt find librt.so in /usr/lib and librt.so.1 in /lib/

I searched for these and found them in /usr/lib/x86_64-linux-gnu/librt.so and /lib/x86_64-linux-gnu/librt.so.1

I copied them to respected folders and then it worked fine without any errors.

On i386 librt is found in /usr/lib/i386-linux-gnu/librt.so

tej
  • 73
  • 12
  • The correct solution would have been to add the folder to the linker search path, by adding the flag `-L/usr/lib/x86_64-linux-gnu`. – Philipp Ludwig Aug 31 '21 at 13:05
0

Install the asynchronous library.

For example in Fedora-linux it'll be libaio-devel. (Mostly not needed, but some issues may occur if not installed)

After Installing compile with the following flags.

cc file.c -lrt

-lrt - link (lrt)read time library.

Gnanesh
  • 668
  • 7
  • 13