[openssl-users] Building OpenSSL on Linux , undefined reference to 'main'
Rob Hermann
rhermann at centonline.com
Mon Feb 15 19:59:39 UTC 2016
I'm attempting to build OpenSSL on a Linux box, when I issue the make
from my OpenSSL directory (OpenSSLWork as seen here), It builds all
the subdirectories under crypto,
then proceeds to
OpenSSLWork/engines
OpenSSLWork/ssl
OpenSSLWork/apps
OpenSSLWork/test
making all in test...
make[1]: Entering directory `/home/rhermann/src/OpenSSLWork/test'
make[2]: Entering directory `/home/rhermann/src/OpenSSLWork/test'
( :; LIBDEPS="${LIBDEPS:--L.. -lssl -L.. -lcrypto -ldl}";
LDCMD="${LDCMD:-gcc}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS
-D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -Wa,--noexecstack -DL_ENDIAN -O3
-fomit-frame-pointer -Wall -DOPENSSL_BN_ASM_PART_WORDS
-DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_GF2m
-DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DRMD160_ASM -DAES_ASM
-DVPAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}"; LIBPATH=`for x in $LIBDEPS;
do echo $x; done | sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo
$LIBPATH | sed -e 's/ /:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH
${LDCMD} ${LDFLAGS} -o ${APPNAME:=md2test} md2test.o ${LIBDEPS} )
_/usr/lib/gcc/i686-redhat-linux/4.4.7/../../../crt1.o: In function
`_start':__
__(.text+0x18): undefined reference to `main'__
_collect2: ld returned 1 exit status
make[2]: *** [link_app.] Error 1
make[2]: Leaving directory `/home/rhermann/src/OpenSSLWork/test'
make[1]: *** [md2test] Error 2
make[1]: Leaving directory `/home/rhermann/src/OpenSSLWork/test'
make: *** [build_tests] Error 1
I know this means I'm missing the main() function the entry point for
all C programs.
I'm trying to build OpenSSL using the procedures outlined in the INSTALL
document, Has anyone seen this before and if so, what have you done to
"fix" it ?
I've tried -nostartfiles as a linker option and that did not help.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mta.openssl.org/pipermail/openssl-users/attachments/20160215/55ca1d67/attachment.html>
More information about the openssl-users
mailing list