{"id":6092,"date":"2014-04-13T02:17:45","date_gmt":"2014-04-13T02:17:45","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/undefined-reference-when-compiling-openssl-collection-of-common-programming-errors\/"},"modified":"2014-04-13T02:17:45","modified_gmt":"2014-04-13T02:17:45","slug":"undefined-reference-when-compiling-openssl-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/04\/13\/undefined-reference-when-compiling-openssl-collection-of-common-programming-errors\/","title":{"rendered":"Undefined reference when compiling OpenSSL-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m not sure what to do here, I ran <code>make<\/code> and got this:<\/p>\n<pre><code>make[2]: Entering directory `\/tmp\/openssl-1.0.1\/test'\n( :; LIBDEPS=\"${LIBDEPS:--L.. -lssl -L.. -lcrypto  -ldl}\"; LDCMD=\"${LDCMD:-gcc}\"; LDFLAGS=\"${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fno-exceptions -Wa,--noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_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:=rc4test} rc4test.o ${LIBDEPS} )\nrc4test.o: In function `main':\nrc4test.c:(.text+0x30): undefined reference to `OPENSSL_cpuid_setup'\ncollect2: ld returned 1 exit status\nmake[2]: *** [link_app.] Error 1\nmake[2]: Leaving directory `\/tmp\/openssl-1.0.1\/test'\nmake[1]: *** [rc4test] Error 2\nmake[1]: Leaving directory `\/tmp\/openssl-1.0.1\/test'\nmake: *** [build_tests] Error 1\n<\/code><\/pre>\n<p>I think this is a gcc thing, but I am not sure how to approach this. Should I be compiling this manually?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m not sure what to do here, I ran make and got this: make[2]: Entering directory `\/tmp\/openssl-1.0.1\/test&#8217; ( :; LIBDEPS=&#8221;${LIBDEPS:&#8211;L.. -lssl -L.. -lcrypto -ldl}&#8221;; LDCMD=&#8221;${LDCMD:-gcc}&#8221;; LDFLAGS=&#8221;${LDFLAGS:&#8211;DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -fno-exceptions -Wa,&#8211;noexecstack -m64 -DL_ENDIAN -DTERMIO -O3 -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM -DGHASH_ASM}&#8221;; LIBPATH=`for x in $LIBDEPS; do echo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-6092","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6092","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=6092"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/6092\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=6092"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=6092"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=6092"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}