Kevin; I'm working on a similar yet different port, having similar issues. One thing I found helpful was to get the 'MACHINE', 'SYSTEM', 'BUILD', and 'RELEASE' settings by running the variants of uname on my target.
Regards; == Rick Davis ----- Original Message ----- From: "Kevin Fowler" <kevpfow...@gmail.com> To: openssl-dev@openssl.org Sent: Friday, December 9, 2011 10:32:10 AM Subject: Re: make build_algvs fails for NetBSD target Just to close my own loop, the incore issue was due to the netbsd compiler not having __linux or __PPC__ defined - it has __NetBSD__ and __powerpc__ defined, which are not in the list that sets FIPS_REF_POINT_IS_CROSS_COMPILER_AWARE in tips_canister.c. I could get the fips_algvs to build by adding those defines as another or case, but don't know if it will actually work or not yet... On Fri, Dec 9, 2011 at 11:31 AM, Kevin Fowler < kevpfow...@gmail.com > wrote: I recognize now that I need to have an option that does not currently exist for my target. I changed my SYSTEM environment variable to NetBSD, which resolves the "-ldl" issue, but is still not correct because the configure scripts land me in BSD-generic32, which is not quite right either. So it looks like I need to modify the scripts to have a BSD-ppc entry that has all the correct settings for that target. While this will get me past the first issue below, I am still dealing with the problem in the incore perl script that fails fipsld ("not cross compiler aware"). I'm not clear what that is indicating I need to correct. Any pointers on that? Thanks, Kevin On Thu, Dec 8, 2011 at 3:42 PM, Kevin Fowler < kevpfow...@gmail.com > wrote: <blockquote> I am building and testing the FIPS module for a PowerPC/NetBSD1.6.2 target on a x86/linux(CentOS) host. The Configure script does not have NetBSD options, so I am setting my environment variables such that it selects the ppc-linux target. The fipscanister.o builds fine. When I go to build the test executable (make build_algvs), it fails. Seems to be because the main Makefile is passing along the environment variables it sets up, including "-ldl", and so ignores the test directories EX_LIBS definition. fips_algvs.c compiles but the linking fails because libdl cannot be found. [kfowler@sherlock openssl-fips-2.0-test-20111208]$ make build_algvs making fipsalgvs in test... make[1]: Entering directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' powerpc--netbsd-gcc -I.. -I../include -I../fips -DOPENSSL_FIPSCANISTER -fPIC -DOPENSSL_PIC -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DTERMIO -O3 -Wall -c -o fips_algvs.o fips_algvs.c make[2]: Entering directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' /opt/netbsd/1.6.2/host/x86-linux2/powerpc--netbsd/bin/ld: cannot find -ldl <<------------------- collect2: ld returned 1 exit status make[2]: *** [link_app.gnu] Error 1 make[2]: Leaving directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' make[1]: *** [fips_algvs] Error 2 make[1]: Leaving directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' make: *** [build_algvs] Error 1 NetBSD does not have a libdl - I can only build the test application by modifying the Makefile...is that legal after fipscanister.o has been built? If I comment the "-ldl" out of the Makefile, and do the build, I then get the following error: making fipsalgvs in test... make[1]: Entering directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' make[2]: Entering directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' ./fips_algvs is not cross-compiler aware. <<--------------------- make[2]: *** [link_app.gnu] Error 42 make[2]: Leaving directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' make[1]: *** [fips_algvs] Error 2 make[1]: Leaving directory `/home/kfowler/fips/openssl-fips-2.0-test-20111208/test' make: *** [build_algvs] Error 1 which seems odd, since it was linked with the cross-compiler linker. Am I doing something wrong here? My environment variables are: export PATH=$CROSSTOOLDIR/bin:$PATH export FIPS_SIG=$PWD/util/incore export MACHINE=ppc export SYSTEM=Linux export ARCH=ppc export CROSS_COMPILE="powerpc--netbsd-" export HOSTCC=gcc Appreciate any help. Kevin </blockquote>