[AWS] OpenSSL on OS X

Adam Puleo adam.puleo at icloud.com
Mon Mar 14 10:10:33 CET 2016


Hello,

I’m struggling trying to configure the .gpr files correctly so that the build finds the OpenSSL libraries.

For the tools I added the following code to the Linker package in tools.gpr:
      case Shared.S_Target is
	     when "Darwin" =>
            for Default_Switches ("Ada")
			   use Linker'Default_Switches ("Ada") & ("-Wl,-L/usr/local/lib,-lssl,-lcrypto");
		 when others =>
		    null;
	  end case;

However I cannot figure out where to put the linker switches in aws.gpr or shared.gpr.

I’m receiving the following errors:
gcc wsdl2aws.o -Wl,-L/usr/local/lib,-lssl,-lcrypto -o wsdl2aws
gprlib aws.lexch
gcc -dynamiclib -shared-libgcc -o /Users/e130199/Downloads/aws-gpl-2015-src/.build/x86_64-apple-darwin13.4.0/release/relocatable/lib/aws/libaws.dylib ... /users/e130199/downloads/aws-gpl-2015-src/.build/x86_64-apple-darwin13.4.0/release/relocatable/obj/ssl/wrappers.o ...
Undefined symbols for architecture x86_64:
  "_TLSv1_1_client_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
  "_TLSv1_1_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
  "_TLSv1_1_server_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
  "_TLSv1_2_client_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
  "_TLSv1_2_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
  "_TLSv1_2_server_method", referenced from:
      _methods.8283 in aws-net-ssl__openssl.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gprlib: /usr/local/gnat/bin/gcc execution error
gprbuild: could not build library for project aws
make: *** [build-native] Error 4

Is there a better way to do this?

Thank you,
-adam



More information about the AWS mailing list