<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ld fails when shared lib code is not position independent in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670844#M50903</link>
    <description>Make sure that *every* object file is being compiled with +z.  In your case the linker is complaining about s2_srvr.o.&lt;BR /&gt;&lt;BR /&gt;Did you run make clean before recompiling?  Are you positive that this has removed all of the object files?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
    <pubDate>Mon, 25 Feb 2002 09:44:28 GMT</pubDate>
    <dc:creator>Steven Gillard_2</dc:creator>
    <dc:date>2002-02-25T09:44:28Z</dc:date>
    <item>
      <title>ld fails when shared lib code is not position independent</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670843#M50902</link>
      <description>I'm trying to install Apache on HP-UX 11 using the openssl module.&lt;BR /&gt;&lt;BR /&gt;Apache make fails with:        &lt;BR /&gt;ld -L/omg/apache22/openssl-0.9.6b -b -o libssl.so mod_ssl.lo ssl_engine_config.lo ssl_engine_compat.lo ssl_engine_ds.lo ssl_engine_dh.lo ssl_engine_init.lo ssl_engine_kernel.lo ssl_engine_rand.lo ssl_engine_io.lo ssl_engine_log.lo ssl_engine_mutex.lo ssl_engine_pphrase.lo ssl_engine_vars.lo ssl_engine_ext.lo ssl_scache.lo ssl_scache_dbm.lo ssl_scache_shmht.lo ssl_scache_shmcb.lo ssl_expr.lo ssl_expr_scan.lo ssl_expr_parse.lo ssl_expr_eval.lo ssl_util.lo ssl_util_ssl.lo ssl_util_sdbm.lo ssl_util_table.lo  -ldbm -lssl -lcrypto -L/usr/local/lib/gcc-lib/hppa1.1-hp-hpux11.00/2.9-hppa-991112 -lgcc  &lt;BR /&gt;ld: DP relative code in file /omg/apache22/openssl-0.9.6b/libssl.a(s2_srvr.o) - shared library must be position&lt;BR /&gt;    independent.  Use +z or +Z to recompile.&lt;BR /&gt;&lt;BR /&gt;BUT ....&lt;BR /&gt;I've compiled the code in /omg/apache22/openssl-0.9.6b/libssl.a with&lt;BR /&gt;a) +z&lt;BR /&gt;b) +Z&lt;BR /&gt;c) -fpic&lt;BR /&gt;d) -fPIC&lt;BR /&gt; - and in each case the Apache make fails&lt;BR /&gt;&lt;BR /&gt;Does anyone have any idea what else to try ?&lt;BR /&gt;Thanks</description>
      <pubDate>Mon, 25 Feb 2002 08:40:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670843#M50902</guid>
      <dc:creator>Geoff Hartnell</dc:creator>
      <dc:date>2002-02-25T08:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: ld fails when shared lib code is not position independent</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670844#M50903</link>
      <description>Make sure that *every* object file is being compiled with +z.  In your case the linker is complaining about s2_srvr.o.&lt;BR /&gt;&lt;BR /&gt;Did you run make clean before recompiling?  Are you positive that this has removed all of the object files?&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve</description>
      <pubDate>Mon, 25 Feb 2002 09:44:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670844#M50903</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-02-25T09:44:28Z</dc:date>
    </item>
    <item>
      <title>Re: ld fails when shared lib code is not position independent</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670845#M50904</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;Thanks for the suggestion&lt;BR /&gt;I tee'd the make command into a log file and can see the file being built        &lt;BR /&gt;gcc -I../crypto -I../include -DTHREADS  -DDSO_DL -DCFLAGS=+z -D_REENTRANT -O3 -DB_ENDIAN -DBN_DIV2W -c s2_srvr.c&lt;BR /&gt;&lt;BR /&gt;I can also confirm that after a make clean, the .o file is not there and that doing ls -l after make shows the recently built file.&lt;BR /&gt;&lt;BR /&gt;Please feel free to make any other suggestions as it's often the obvious that gets overlooked&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Geoff&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Feb 2002 12:05:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670845#M50904</guid>
      <dc:creator>Geoff Hartnell</dc:creator>
      <dc:date>2002-02-25T12:05:40Z</dc:date>
    </item>
    <item>
      <title>Re: ld fails when shared lib code is not position independent</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670846#M50905</link>
      <description>The build command you've given isn't right:&lt;BR /&gt;&lt;BR /&gt;gcc -I../crypto -I../include -DTHREADS -DDSO_DL -DCFLAGS=+z -D_REENTRANT -O3 -DB_ENDIAN -DBN_DIV2W -c s2_srvr.c &lt;BR /&gt;&lt;BR /&gt;Firstly, the +z flag should be a separate argument to the compiler.  Above its given as a CFLAGS macro through -D which is wrong.  Secondly, you're using gcc which does not recognise +z/+Z (these are the arguments to use with the HP compilers).  With gcc you should be using -fPIC.&lt;BR /&gt;&lt;BR /&gt;The correct command line should be:&lt;BR /&gt;&lt;BR /&gt;gcc -I../crypto -I../include -DTHREADS -DDSO_DL -D_REENTRANT -O3 -DB_ENDIAN -DBN_DIV2W -fPIC -c s2_srvr.c &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve&lt;BR /&gt;</description>
      <pubDate>Mon, 25 Feb 2002 18:14:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670846#M50905</guid>
      <dc:creator>Steven Gillard_2</dc:creator>
      <dc:date>2002-02-25T18:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: ld fails when shared lib code is not position independent</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670847#M50906</link>
      <description>Achieved a solution to this problem by doing the following:&lt;BR /&gt;&lt;BR /&gt;1) configure and compile openssl:&lt;BR /&gt;cd openss1-0.9.6b&lt;BR /&gt;config -DCFLAGS=+z&lt;BR /&gt;make&lt;BR /&gt;make install&lt;BR /&gt;&lt;BR /&gt;2) install and configure mod_ssl (obtain mod_ssl-2.8.5-1.3.22.tar .gz, gzip -d and tar xvf)&lt;BR /&gt;cd ../mod_ssl-2.8.5-1.3.22&lt;BR /&gt;./configure --with-apache=&lt;HOME&gt;/apache_1.3.22 --with-ssl=&lt;HOME&gt;/openssl-0.9.6b --prefix=&lt;HOME&gt;/apache_1.3.22 --enable-module=so --enable-rule=SHARED_CORE&lt;BR /&gt;&lt;BR /&gt;3) build Apache&lt;BR /&gt;cd ../apache_1.3.22&lt;BR /&gt;make&lt;BR /&gt;&lt;BR /&gt;4) Make the certificate&lt;BR /&gt;make certificate TYPE=&lt;BR /&gt;&lt;BR /&gt;5) Install Apache&lt;BR /&gt;make install&lt;BR /&gt;&lt;BR /&gt;&lt;/HOME&gt;&lt;/HOME&gt;&lt;/HOME&gt;</description>
      <pubDate>Wed, 27 Feb 2002 07:35:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-fails-when-shared-lib-code-is-not-position-independent/m-p/2670847#M50906</guid>
      <dc:creator>Geoff Hartnell</dc:creator>
      <dc:date>2002-02-27T07:35:36Z</dc:date>
    </item>
  </channel>
</rss>

