1

I followed a guide on how to install AWS C++ SDK on Solaris here, and I got it to install successfully. The issue is that the AWS libraries installed are 32 bit instead of 64 bit. By default the AWS attempts to link to 64 bit library files on my OS, but because the AWS libraries are 32 bit it results in the following error:

ld: fatal: file /usr/lib/64/libssl.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to libaws-cpp-sdk-core.so
collect2: error: ld returned 1 exit status
gmake[2]: *** [aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/build.make:2480: aws-cpp-sdk-core/libaws-cpp-sdk-core.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:173: aws-cpp-sdk-core/CMakeFiles/aws-cpp-sdk-core.dir/all] Error 2
gmake: *** [Makefile:128: all] Error 2

Running file on one of the .so files (e.g. libaws-cpp-sdk-core.so) returns the following:

ELF 32-bit LSB dynamic lib 80386 Version 1, dynamically linked, not stripped

Doing the same for a library file already on my OS (e.g. libssl.so) returns the following:

ELF 64-bit LSB dynamic lib AMD64 Version 1, dynamically linked, not stripped

I have been able to get everything working in 32 bit by having AWS link to the 32 bit versions of the library files it tries to link to, but I cannot find any information on how to build the AWS libraries in 64 bit and I have no idea where else to look. Any and all help is greatly appreciated.

dmoini
  • 313
  • 2
  • 15
  • 2
    You're going to have to rebuild the SDK as 64-bit. Offhand, setting `CFLAGS=-m64` and `CXXFLAGS=-m64` stands a good chance of working. – Andrew Henle Jul 16 '19 at 09:59
  • @AndrewHenle Are these simply flags I can add on the command line when running cmake/gmake or do I have to update their values at every occurrence I find in makefiles? – dmoini Jul 16 '19 at 21:10
  • 2
    See https://stackoverflow.com/questions/10085945/set-cflags-and-cxxflags-options-using-cmake It might be as simple as running `export CFLAGS=-m64` and `export CXXFLAGS=-m64` prior to running `cmake`. – Andrew Henle Jul 16 '19 at 21:20
  • @AndrewHenle That worked. Thank you very much for your help. – dmoini Jul 16 '19 at 22:43

1 Answers1

1

Check comments of question for answer.

dmoini
  • 313
  • 2
  • 15