<?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: Errors while compiling code through gcc in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429683#M682544</link>
    <description>Hey,&lt;BR /&gt;&lt;BR /&gt;your output is a little bit confusing because you apparently pasted the output of two different compilation runs: hellomake.c and hellofunc.c :)&lt;BR /&gt;&lt;BR /&gt;For me it seems that there is a kind of configuration problem, although I do not know which one :) Where did you get the gcc exectuable from? Did you compile them yourself or did you download them from the HP-UX porting archive.&lt;BR /&gt;&lt;BR /&gt;I made some tests on 11.31 and 11.23 with the executables and files from the HP-UX porting archive (&lt;A href="http://hpux.connect.org.uk)" target="_blank"&gt;http://hpux.connect.org.uk)&lt;/A&gt; and I had no problems with the -Wl,+s.&lt;BR /&gt;&lt;BR /&gt;So, my suggestion would be to download the following three files for 11.23:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.13/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.13/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gettext-0.17/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gettext-0.17/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The files should be installed in the default directory (/usr/local) ... otherwise you would get some "library not found" errors when running gcc/as.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 03 Jun 2009 13:35:18 GMT</pubDate>
    <dc:creator>Andre-Marcel Hellmund</dc:creator>
    <dc:date>2009-06-03T13:35:18Z</dc:date>
    <item>
      <title>Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429667#M682528</link>
      <description>Hello,&lt;BR /&gt;   I am getting strange errors while compiling my code through GCC. Earlier it was showing "ld: Can't find library or mismatched ABI for -lutil" After compiling the libraries source this error was sorted out. Then it was not able to link the header files while compiling because of which it was showing errors and warning almost on each and every line.&lt;BR /&gt;&lt;BR /&gt;I guess I am goofing up with the make file. Can any one of you please help me in correcting my makefile. Below are the contents I guess are used for my system. &lt;BR /&gt;This is an Itanium box OS v11.23. &lt;BR /&gt;&lt;BR /&gt;======makefile.pre===========&lt;BR /&gt;ifeq (${PLATFORM}, HP-UX)&lt;BR /&gt;    CC = /usr/local/bin/gcc&lt;BR /&gt;    MAKEDEPEND = ${GENEVA_HOME}/Interface/makedepend&lt;BR /&gt;    ARCH_FLAG = #            Flag indicating chip architecture.&lt;BR /&gt;    #ARCH_FLAG = -m     -DSS_64BIT_SERVER #            Flag indicating chip architecture.&lt;BR /&gt;    #ARCH_FLAG = +DA2.0W +DS2.0    +DA2.0W +DS2.0 -DSS_64BIT_SERVER #            Flag indicating chip architecture.&lt;BR /&gt;    USE_SHLIB_PATH = -Wl,+s        # Force use of SHLIB_PATH at run-time&lt;BR /&gt;    #CPPFLAGS += -D_HPUX_SOURCE -DHPUX  -march=2.0    -march=2.0 -DSS_64BIT_SERVER # C preprocessor flags&lt;BR /&gt;    CPPFLAGS +=  -DSS_64BIT_SERVER # C preprocessor flags&lt;BR /&gt;    #CPPFLAGS += -D_HPUX_SOURCE -DHPUX +DD64 +DS2.0    +DD64 +DS2.0 -DSS_64BIT_SERVER # C preprocessor flags&lt;BR /&gt;    DONT_MAP_ADDRZERO = -z&lt;BR /&gt;&lt;BR /&gt;    CFLAGS = ${COPT} ${CPPFLAGS} ${DONT_MAP_ADDRZERO} ${ARCH_FLAG} ${USE_SHLIB_PATH}&lt;BR /&gt;   LIB_EXTRA_LIBS =&lt;BR /&gt;# Shared Library stuff below here&lt;BR /&gt;    SHLIB_ARCH_FLAG = +DD64 +DS2.0    +DD64 +DS2.0 -DSS_64BIT_SERVER #            Flag indicating chip architecture.&lt;BR /&gt;    SHLIB_CFLAGS = ${COPT} ${CPPFLAGS} ${DONT_MAP_ADDRZERO} ${SHLIB_ARCH_FLAG}&lt;BR /&gt;    SHLIB_LDFLAGS = -b&lt;BR /&gt;    export SHLIB_SUFFIX = sl&lt;BR /&gt;    SHLIB_VERS_SUFFIX = ${library.version}&lt;BR /&gt;    SHLIB_LIB = dl&lt;BR /&gt;    SHLIB_EXTRA_LIBS =&lt;BR /&gt;    SHLIB_MODE = 755&lt;BR /&gt;    SMALLPICFLAGS=+z&lt;BR /&gt;    BIGPICFLAGS=+Z&lt;BR /&gt;# Dynamic Library stuff below here (called from Geneva direct)&lt;BR /&gt;    DYNLIB_ARCH_FLAG = +DD64&lt;BR /&gt;    DYNLIB_CFLAGS = ${COPT} ${CPPFLAGS} ${DONT_MAP_ADDRZERO} ${DYNLIB_ARCH_FLAG}&lt;BR /&gt;endif&lt;BR /&gt;========makefile.pre End============&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;===========makefile.post============&lt;BR /&gt;.SUFFIXES:&lt;BR /&gt;.SUFFIXES:      .sh .awk  .pl .a  .sl .so .o .opic .c  .y   .l   .s   .h   .H \&lt;BR /&gt;                        .I  .i    .f  .C  .Y .L    .lc .dat .dbl .bin .cfg .pc \&lt;BR /&gt;                        .sqc .sqh .sql .dot&lt;BR /&gt;&lt;BR /&gt;.c:&lt;BR /&gt;        $(CC) -ansi $(CFLAGS) -o $@ $&amp;lt; $(LIBS)&lt;BR /&gt;&lt;BR /&gt;.c.o:&lt;BR /&gt;        $(CC) -c -ansi $(CFLAGS) ${C_INCLUDE_PATH} -o $@ $&amp;lt; ${LIB_EXTRA_LIBS}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.c.opic:&lt;BR /&gt;        $(CC) $(SMALLPICFLAGS) -c $(INC_FLAGS) $(LIB_CFLAGS) $&amp;lt; -o $@&lt;BR /&gt;&lt;BR /&gt;.pc.c:&lt;BR /&gt;        @ echo precompiling $&amp;lt;&lt;BR /&gt;        ${PROC} ${PROCFLAGS} ${ORA_INC_PATH} oname=$(*F).c $&amp;lt;&lt;BR /&gt;=========End makefile.post===========&lt;BR /&gt;&lt;BR /&gt;Please help me out. The same code is getting compiled on PA-RISC box without any issues.&lt;BR /&gt;&lt;BR /&gt;FYI, Currently I am again getting error "ld: Can't find library or mismatched ABI for -lutil" and when compiling the library source I guess it is not able to link the header sys/unistd.h. &lt;BR /&gt;Please Help me get out of this problems.</description>
      <pubDate>Sat, 30 May 2009 12:01:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429667#M682528</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-05-30T12:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429668#M682529</link>
      <description>Where's your errors?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;export SHLIB_SUFFIX = sl&lt;BR /&gt;&lt;BR /&gt;On Integrity, this should be "so".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;"ld: Can't find library or mismatched ABI for -lutil"&lt;BR /&gt;&lt;BR /&gt;Where is libutil?  What does file(1) show for that lib?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;it is not able to link the header sys/unistd.h.&lt;BR /&gt;&lt;BR /&gt;You don't "link" headers, you include them.&lt;BR /&gt;</description>
      <pubDate>Sat, 30 May 2009 12:40:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429668#M682529</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-05-30T12:40:30Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429669#M682530</link>
      <description>Hi Dennis&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;Where's your errors?&lt;BR /&gt;I did not get this question. I am getting the errors when compiling the code. These doesnt seems to be any syntactic or symantic error. These are definitely because of makefile. Since the same code is working fine on PA-RISC box. The changes on the new box are its an Itanium box and instead of ANSI C we are using GCC. So need to change the makefile according to these changes. This is where I am struggling. Need your help in this.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;export SHLIB_SUFFIX = sl&lt;BR /&gt;&amp;gt;&amp;gt;On Integrity, this should be "so".&lt;BR /&gt;Changed the SHLIB_SUFFIX to "so" now it is giving error:&lt;BR /&gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;Fatal error.&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;&lt;BR /&gt;USE_SHLIB_PATH is set to "-Wl,+s".&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;"ld: Can't find library or mismatched ABI for -lutil"&lt;BR /&gt;&amp;gt;Where is libutil? What does file(1) show for that lib?&lt;BR /&gt;libutil is in custom directory, the custom directory is in the path.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;it is not able to link the header sys/unistd.h.&lt;BR /&gt;&amp;gt;You don't "link" headers, you include them.&lt;BR /&gt;oops slip of tongue. I meant "include" only. &lt;BR /&gt;&lt;BR /&gt;But I am unable to understand even though header files were in the same path as the .c files and .pc files why it was giving errors for the macros that were defined in the header files.</description>
      <pubDate>Mon, 01 Jun 2009 06:10:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429669#M682530</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-01T06:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429670#M682531</link>
      <description>&amp;gt;&amp;gt;Where's your errors?&lt;BR /&gt;&amp;gt;I did not get this question.&lt;BR /&gt;&lt;BR /&gt;It's called cut &amp;amp; paste.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;These doesn't seems to be any syntactic or semantic error.&lt;BR /&gt;&lt;BR /&gt;Then what are they?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;we are using GCC. So need to change the makefile according to these changes.&lt;BR /&gt;&lt;BR /&gt;Where are your errors to show the problem?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Changed the SHLIB_SUFFIX to "so" now it is giving error:&lt;BR /&gt;&lt;BR /&gt;Not sure why, it should be cosmetic.&lt;BR /&gt;You should be defining LD as /usr/local/bin/gcc&lt;BR /&gt;&lt;BR /&gt;&amp;gt;libutil is in custom directory, the custom directory is in the path.&lt;BR /&gt;&lt;BR /&gt;One of your -L paths?  what does file(1) show for libutil?&lt;BR /&gt;&lt;BR /&gt;How are you including them?  If you use "#include &lt;FOO.H&gt;" they have to be in a -I path.&lt;BR /&gt;&lt;/FOO.H&gt;</description>
      <pubDate>Mon, 01 Jun 2009 06:47:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429670#M682531</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-01T06:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429671#M682532</link>
      <description>&amp;gt;&amp;gt;These doesn't seems to be any syntactic or semantic error.&lt;BR /&gt;&amp;gt;Then what are they?&lt;BR /&gt;These are related to the libraries or the errors in the makefile.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;we are using GCC. So need to change the makefile according to these changes.&lt;BR /&gt;&amp;gt;Where are your errors to show the problem?&lt;BR /&gt;Below are the compiler message.&lt;BR /&gt;-----------------------------------------&lt;BR /&gt;/usr/local/bin/gcc -O -DSS_64BIT_SERVER  -z  -Wl,+s         -o doc1bpp_soe transform_funcs.o transform_funcs_soe.o transform_funcs_edifact.o doc1bpp.o input_funcs.o output_funcs.o  -L/bbsbtest/data/phdev1/Interface/lib/HP-UX -L/bbsbtest/data/phdev1/Interface/releases/delivery/lib/btgs1 -lutil -lprocutil `cat /dboracle/orabase/product/10.2.0.4/lib/sysliblist` -L/dboracle/orabase/product/10.2.0.4/precomp/lib -L/dboracle/orabase/product/10.2.0.4/lib -lclntsh   `cat /dboracle/orabase/product/10.2.0.4/lib/sysliblist`  -lm -lpthread -lpthread  -L/lib&lt;BR /&gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;Fatal error.&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;make[1]: *** [doc1bpp_soe] Error 1&lt;BR /&gt;make[1]: Leaving directory `/bbsbtest/data/phdev1/Interface/rakeshv/4-0-14-7/bin/HP-UX'&lt;BR /&gt;make: *** [exe] Error 2&lt;BR /&gt;-------------------------------------------&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Changed the SHLIB_SUFFIX to "so" now it is giving error:&lt;BR /&gt;&lt;BR /&gt;Not sure why, it should be cosmetic.&lt;BR /&gt;You should be defining LD as /usr/local/bin/gcc&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;libutil is in custom directory, the custom directory is in the path.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;One of your -L paths? what does file(1) show for libutil?&lt;BR /&gt;libutil.a:      archive file&lt;BR /&gt;&lt;BR /&gt;&amp;gt;How are you including them? If you use "#include &lt;FOO.H&gt;" they have to be in a -I path.&lt;BR /&gt;Header files are in a -I path.&lt;/FOO.H&gt;</description>
      <pubDate>Mon, 01 Jun 2009 08:28:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429671#M682532</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-01T08:28:12Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429672#M682533</link>
      <description>&amp;gt;Below are the compiler message.&lt;BR /&gt;&amp;gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;&lt;BR /&gt;This is a linker error.&lt;BR /&gt;The first "-Wl,+s" should be fine, since it is sent to the driver.  That leaves this file:&lt;BR /&gt;/dboracle/orabase/product/10.2.0.4/lib/sysliblist&lt;BR /&gt;&lt;BR /&gt;Or possibly the variable LDOPTS.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;libutil.a: archive file&lt;BR /&gt;&lt;BR /&gt;How did you create this file?  Did you use HP's ar(1) or a foreign devil one?&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Header files are in a -I path.&lt;BR /&gt;&lt;BR /&gt;You can look at the -E output to see which header is used.</description>
      <pubDate>Mon, 01 Jun 2009 09:08:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429672#M682533</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-01T09:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429673#M682534</link>
      <description>&amp;gt;&amp;gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;&amp;gt;This is a linker error.&lt;BR /&gt;The first "-Wl,+s" should be fine, since it is sent to the driver. That leaves this file:&lt;BR /&gt;/dboracle/orabase/product/10.2.0.4/lib/sysliblist Or possibly the variable LDOPTS.&lt;BR /&gt;&lt;BR /&gt;So what is the solution to this problem. If need be you can look at the makefile settings in my original posting.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;libutil.a: archive file&lt;BR /&gt;&amp;gt;How did you create this file? Did you use HP's ar(1) or a foreign devil one?&lt;BR /&gt;HP's ar is used to create the file.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;&amp;gt;Header files are in a -I path.&lt;BR /&gt;&amp;gt;You can look at the -E output to see which header is used.&lt;BR /&gt;&lt;BR /&gt;Right now I am not getting this error. If we can solve the Wl,+s problem I guess this will also get solved.</description>
      <pubDate>Mon, 01 Jun 2009 12:14:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429673#M682534</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-01T12:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429674#M682535</link>
      <description>&amp;gt;/dboracle/orabase/product/10.2.0.4/lib/sysliblist &amp;gt;Or possibly the variable LDOPTS.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;So what is the solution to this problem?&lt;BR /&gt;&lt;BR /&gt;As I asked, is LDOPTS set?  What is in sysliblist?&lt;BR /&gt;&lt;BR /&gt;You may have to use tusc to trace what gcc is doing.&lt;BR /&gt;&lt;BR /&gt;Also, you should remove +DS2.0, this is PA only.</description>
      <pubDate>Tue, 02 Jun 2009 06:55:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429674#M682535</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-02T06:55:46Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429675#M682536</link>
      <description>Hey,&lt;BR /&gt;&lt;BR /&gt;&amp;gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;&amp;gt; Fatal error.&lt;BR /&gt;&amp;gt; collect2: ld returned 1 exit status&lt;BR /&gt;&amp;gt; make[1]: *** [doc1bpp_soe] Error 1&lt;BR /&gt;&lt;BR /&gt;collect2 is a utility used by gcc to link programs, it finally calls the GNU ld (&lt;A href="http://gcc.gnu.org/onlinedocs/gccint/Collect2.html)." target="_blank"&gt;http://gcc.gnu.org/onlinedocs/gccint/Collect2.html).&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;You could also use the -v gcc option to check which options are finally passed to the collect2 executable. The strange thing is that gcc apparently passes the complete -Wl,+s to the linker without dropping the leading -Wl.&lt;BR /&gt;&lt;BR /&gt;By the way, the GNU linker does not support the +s option. This must be HP linker only. For a list of GNU linker options, &lt;A href="http://sourceware.org/binutils/docs-2.19/ld/Options.html#Options" target="_blank"&gt;http://sourceware.org/binutils/docs-2.19/ld/Options.html#Options&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Which version of GCC and BINUTILS are you using (gcc --version &amp;amp; ld --version)?&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;Andi</description>
      <pubDate>Tue, 02 Jun 2009 12:38:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429675#M682536</guid>
      <dc:creator>Andre-Marcel Hellmund</dc:creator>
      <dc:date>2009-06-02T12:38:35Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429676#M682537</link>
      <description>Dennis&lt;BR /&gt;&amp;gt;As I asked, is LDOPTS set? What is in sysliblist?&lt;BR /&gt;LDOPTS is not set. &lt;BR /&gt;sysliblist contains &lt;BR /&gt;-l:librt.so -l:libnss_dns.so.1 -l:libdld.so -lm -lpthread -lunwind -lnsl&lt;BR /&gt;&lt;BR /&gt;&amp;gt;you should remove +DS2.0, this is PA only&lt;BR /&gt;My "ARCH_FLAG" reads "ARCH_FLAG = ", I have also removed DS2.0 from other flags as well.&lt;BR /&gt;&lt;BR /&gt;Andy&lt;BR /&gt;&amp;gt;Which version of GCC and BINUTILS are you using (gcc --version &amp;amp; ld --version)?&lt;BR /&gt;I am using  gcc-4.2.3 and ld_ia. How do I find which BINUTILS is it. &lt;BR /&gt;&lt;BR /&gt;I am sorry I am novice in creating Makefiles.</description>
      <pubDate>Tue, 02 Jun 2009 14:17:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429676#M682537</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-02T14:17:49Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429677#M682538</link>
      <description>Hey,&lt;BR /&gt;&lt;BR /&gt;I do not think it is a BINUTILS issue as gcc as compile driver is passing the command line options to the linker. But nevertheless, you get the BINUTILS version corresponding to your linker by executing:&lt;BR /&gt;&lt;BR /&gt;$ ld --version&lt;BR /&gt;GNU ld (GNU Binutils for Ubuntu) 2.18&lt;BR /&gt;&lt;BR /&gt;Currently, I do not know why gcc does not pass the +s to the linker (you could debug a little bit with -v to gcc), but it is meaningless however, as +s does not exist as a valid option. &lt;BR /&gt;&lt;BR /&gt;As a possible way to get it working (as I do not know if the GNU linker has a similar flag as the HP linker +s option), you could build your application without -Wl,+s. Then you could check with chatr(1) where the dynamic linker searches for dynamic libraries:&lt;BR /&gt;&lt;BR /&gt;$ chatr &lt;EXECUTABLE&gt;&lt;BR /&gt;test:&lt;BR /&gt;64-bit ELF executable&lt;BR /&gt;shared library dynamic path search:&lt;BR /&gt;LD_LIBRARY_PATH    enabled  first&lt;BR /&gt;SHLIB_PATH         enabled  second&lt;BR /&gt;embedded path      enabled  third [...]&lt;BR /&gt;&lt;BR /&gt;If LD_LIBRARY_PATH and SHLIB_PATH are disabled by default, you could enable them by doing:&lt;BR /&gt;&lt;BR /&gt;$ chatr +s enable &lt;EXECUTABLE&gt;&lt;BR /&gt;&lt;BR /&gt;Hope that helps ...&lt;BR /&gt;&lt;BR /&gt;Andi&lt;BR /&gt;&lt;BR /&gt;&lt;/EXECUTABLE&gt;&lt;/EXECUTABLE&gt;</description>
      <pubDate>Tue, 02 Jun 2009 14:54:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429677#M682538</guid>
      <dc:creator>Andre-Marcel Hellmund</dc:creator>
      <dc:date>2009-06-02T14:54:48Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429678#M682539</link>
      <description>Hey,&lt;BR /&gt;&lt;BR /&gt;okay, I was probably a little bit wrong and/or a little bit too fast :)&lt;BR /&gt;&lt;BR /&gt;That's the result if you just check on x86 (and not Itanium) and do not read the manual carefully. Collect2 does NOT call the GNU linker, but the native linker which is in this case (I assume) the HP linker. So, the +s option is valid, of course ...&lt;BR /&gt;&lt;BR /&gt;This is how collect2 determines which linker to call:&lt;BR /&gt;&lt;BR /&gt;"The program collect2 is installed as ld in the directory where the passes of the compiler are installed. When collect2 needs to find the real ld, it tries the following file names: &lt;BR /&gt;&lt;BR /&gt;- a hard coded linker file name, if GCC was configured with the --with-ld option. &lt;BR /&gt;- real-ld in the directories listed in the compiler's search directories. &lt;BR /&gt;- real-ld in the directories listed in the environment variable PATH. &lt;BR /&gt;- The file specified in the REAL_LD_FILE_NAME configuration macro, if specified. &lt;BR /&gt;- ld in the compiler's search directories, except that collect2 will not execute itself recursively. &lt;BR /&gt;- ld in PATH."&lt;BR /&gt;&lt;BR /&gt;Sorry for that :D&lt;BR /&gt;&lt;BR /&gt;Nevertheless, try to compile without this -Wl,+s and could you probably post the output of your gcc call plus the -v option added. I guess there could be probably a configuration problem.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 02 Jun 2009 15:20:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429678#M682539</guid>
      <dc:creator>Andre-Marcel Hellmund</dc:creator>
      <dc:date>2009-06-02T15:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429679#M682540</link>
      <description>&amp;gt;you could build your application without -Wl,+s.&lt;BR /&gt;&lt;BR /&gt;I tried that way too. but it gives whole lot of errors. It does not recognise the macros defined in the header file. Basically it does not include the header files while compiling.</description>
      <pubDate>Tue, 02 Jun 2009 15:20:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429679#M682540</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-02T15:20:28Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429680#M682541</link>
      <description>&amp;gt;&amp;gt;you could build your application without -Wl,+s.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I tried that way too. but it gives whole lot of errors. It does not recognise the macros defined in the header file. Basically it does not include the header files while compiling.&lt;BR /&gt;&lt;BR /&gt;There should be no connection between -Wl,+s and header includes.&lt;BR /&gt;&lt;BR /&gt;Why don't you throw your makefile away and try compiling a simple C hello world program and pass in -Wl,+s with -v and show us the output.</description>
      <pubDate>Tue, 02 Jun 2009 15:40:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429680#M682541</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-02T15:40:23Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429681#M682542</link>
      <description>The output is:&lt;BR /&gt;gcc: ../hellomake.c: No such file or directory&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt;gcc: ../hellofunc.c: No such file or directory&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt;gcc: hellomake.o: No such file or directory&lt;BR /&gt;gcc: hellofunc.o: No such file or directory&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt;[phdev1]/bbsbtest/data/phdev1/Interface/rakeshv/4-0-8-10/bin/test $ mv a HP-UX/&lt;BR /&gt;[phdev1]/bbsbtest/data/phdev1/Interface/rakeshv/4-0-8-10/bin/test $ cd HP-UX/&lt;BR /&gt;[phdev1]/bbsbtest/data/phdev1/Interface/rakeshv/4-0-8-10/bin/test/HP-UX $ a&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt; /usr/local/libexec/gcc/ia64-hp-hpux11.23/4.2.3/cc1 -quiet -v -I../ -I/bbsbtest/data/phdev1/Interface/include -I/bbsbtest/data/phdev1/Interface/delivery/include/btgs1:/usr/include -I/dboracle/orabase/product/10.2.0.4/precomp/public -D_HPUX_SOURCE -DHPUX -DSS_64BIT_SERVER ../hellomake.c -quiet -dumpbase hellomake.c -ansi -auxbase-strip hellomake.o -O -ansi -version -o /var/tmp//ccp2VXCm.s&lt;BR /&gt;ignoring nonexistent directory "NONE/include"&lt;BR /&gt;ignoring nonexistent directory "/usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.3/../../../../ia64-hp-hpux11.23/include"&lt;BR /&gt;ignoring nonexistent directory "/bbsbtest/data/phdev1/Interface/delivery/include/btgs1:/usr/include"&lt;BR /&gt;#include "..." search starts here:&lt;BR /&gt;#include &amp;lt;...&amp;gt; search starts here:&lt;BR /&gt;[phdev1]/bbsbtest/data/phdev1/Interface/rakeshv/4-0-8-10/bin/test/HP-UX $ a&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt; /usr/local/libexec/gcc/ia64-hp-hpux11.23/4.2.3/cc1 -quiet -v -I../ -I/bbsbtest/data/phdev1/Interface/include -I/bbsbtest/data/phdev1/Interface/delivery/include/btgs1:/usr/include -I/dboracle/orabase/product/10.2.0.4/precomp/public -D_HPUX_SOURCE -DHPUX -DSS_64BIT_SERVER ../hellomake.c -quiet -dumpbase hellomake.c -ansi -auxbase-strip hellomake.o -O -ansi -version -o /var/tmp//ccx5RRJj.s&lt;BR /&gt;ignoring nonexistent directory "NONE/include"&lt;BR /&gt;ignoring nonexistent directory "/usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.3/../../../../ia64-hp-hpux11.23/include"&lt;BR /&gt;ignoring nonexistent directory "/bbsbtest/data/phdev1/Interface/delivery/include/btgs1:/usr/include"&lt;BR /&gt;#include "..." search starts here:&lt;BR /&gt;#include &amp;lt;...&amp;gt; search starts here:&lt;BR /&gt; ../&lt;BR /&gt; /bbsbtest/data/phdev1/Interface/include&lt;BR /&gt; /dboracle/orabase/product/10.2.0.4/precomp/public&lt;BR /&gt; /usr/local/include&lt;BR /&gt; /usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.3/include&lt;BR /&gt; /usr/include&lt;BR /&gt;End of search list.&lt;BR /&gt;GNU C version 4.2.3 (ia64-hp-hpux11.23)&lt;BR /&gt;        compiled by GNU C version 4.2.3.&lt;BR /&gt;GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072&lt;BR /&gt;Compiler executable checksum: a60fba7fb6c876ab3d8a00a8d3192d93&lt;BR /&gt; /usr/local/bin/as -x -o hellofunc.o /var/tmp//cc2ZZNer.s&lt;BR /&gt;Using built-in specs.&lt;BR /&gt;Target: ia64-hp-hpux11.23&lt;BR /&gt;Configured with: ../gcc/configure&lt;BR /&gt;Thread model: posix&lt;BR /&gt;gcc version 4.2.3&lt;BR /&gt; /usr/local/libexec/gcc/ia64-hp-hpux11.23/4.2.3/collect2 -z +Accept TypeMismatch -u main -o hellomake -z -Wl,+s /usr/lib/hpux32/unix98.o -L/bbsbtest/data/phdev1/Interface/lib/HP-UX -L/bbsbtest/data/phdev1/Interface/releases/delivery/lib/btgs1 -L/usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.3 -L/usr/ccs/lib -L/usr/local/lib/gcc/ia64-hp-hpux11.23/4.2.3/../../.. hellomake.o hellofunc.o -lutil -lprocutil -l:librt.so -l:libnss_dns.so.1 -l:libdld.so -lm -lpthread -lunwind -lnsl -lgcc -lc -lgcc&lt;BR /&gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;Fatal error.&lt;BR /&gt;collect2: ld returned 1 exit status</description>
      <pubDate>Tue, 02 Jun 2009 16:22:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429681#M682542</guid>
      <dc:creator>aarvee</dc:creator>
      <dc:date>2009-06-02T16:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429682#M682543</link>
      <description>&amp;gt;The output is:&lt;BR /&gt;/usr/local/libexec/gcc/ia64-hp-hpux11.23/4.2.3/collect2 -z +Accept TypeMismatch -u main -o hellomake -z -Wl,+s ...&lt;BR /&gt;ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;&lt;BR /&gt;What's in the script "a"?  Besides gcc hellofunc.c?&lt;BR /&gt;&lt;BR /&gt;This shows collect and ld getting -Wl,+s directly.&lt;BR /&gt;&lt;BR /&gt;If you can't show where -Wl,+s comes, you are going to have to use the tusc hammer:&lt;BR /&gt;tusc -fp -ae -o tusc.out gcc hellofunc.c</description>
      <pubDate>Tue, 02 Jun 2009 23:24:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429682#M682543</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-06-02T23:24:56Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429683#M682544</link>
      <description>Hey,&lt;BR /&gt;&lt;BR /&gt;your output is a little bit confusing because you apparently pasted the output of two different compilation runs: hellomake.c and hellofunc.c :)&lt;BR /&gt;&lt;BR /&gt;For me it seems that there is a kind of configuration problem, although I do not know which one :) Where did you get the gcc exectuable from? Did you compile them yourself or did you download them from the HP-UX porting archive.&lt;BR /&gt;&lt;BR /&gt;I made some tests on 11.31 and 11.23 with the executables and files from the HP-UX porting archive (&lt;A href="http://hpux.connect.org.uk)" target="_blank"&gt;http://hpux.connect.org.uk)&lt;/A&gt; and I had no problems with the -Wl,+s.&lt;BR /&gt;&lt;BR /&gt;So, my suggestion would be to download the following three files for 11.23:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.13/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Development/Libraries/libiconv-1.13/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gettext-0.17/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gettext-0.17/&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/gcc-4.2.3/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The files should be installed in the default directory (/usr/local) ... otherwise you would get some "library not found" errors when running gcc/as.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 03 Jun 2009 13:35:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429683#M682544</guid>
      <dc:creator>Andre-Marcel Hellmund</dc:creator>
      <dc:date>2009-06-03T13:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429684#M682545</link>
      <description>&lt;!--!*#--&gt;&amp;gt; [...] I had no problems with the -Wl,+s.&lt;BR /&gt;&lt;BR /&gt;Knowing nothing, I'd guess that "ld" would&lt;BR /&gt;be happy with "+s", and that the compiler&lt;BR /&gt;(compiler driver) would turn "-Wl,+s" on its&lt;BR /&gt;command line into "+s" on its "ld" command&lt;BR /&gt;line, but I might expect a problem if someone&lt;BR /&gt;found a way to get "-Wl,+s" onto the "ld"&lt;BR /&gt;command line itself, which is what&lt;BR /&gt;      ld: Unrecognized argument: -Wl,+s&lt;BR /&gt;looks like to me.</description>
      <pubDate>Wed, 03 Jun 2009 13:46:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429684#M682545</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-06-03T13:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Errors while compiling code through gcc</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429685#M682546</link>
      <description>Hey Steven,&lt;BR /&gt;&lt;BR /&gt;yes, you are right. But the compiler driver (gcc) apparently did not drop the "-Wl," before calling collect2 (which then calls ld).&lt;BR /&gt;&lt;BR /&gt;&amp;gt;aarvee: collect2 -z +Accept TypeMismatch -u main -o hellomake -z -Wl,+s [...]&lt;BR /&gt;&lt;BR /&gt;If I do a test compile "gcc [..] -Wl,+s", collect2 is called with +s only.</description>
      <pubDate>Wed, 03 Jun 2009 13:55:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/errors-while-compiling-code-through-gcc/m-p/4429685#M682546</guid>
      <dc:creator>Andre-Marcel Hellmund</dc:creator>
      <dc:date>2009-06-03T13:55:21Z</dc:date>
    </item>
  </channel>
</rss>

