<?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 error when gcc-compiling in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595407#M33320</link>
    <description>I am having the exact same link problem:&lt;BR /&gt;&lt;BR /&gt;gcc test.c -o test&lt;BR /&gt;/usr/ccs/bin/ld: Unrecognized argument: +Accept&lt;BR /&gt;/usr/ccs/bin/ld: Usage:  /usr/ccs/bin/ld [options] [flags] files&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;&lt;BR /&gt;Downloading/installing the latest binutils (which has an earlier date (07/25) than those installed with the gcc bundled (08/15)) makes things worse: I get the following error:&lt;BR /&gt;&lt;BR /&gt;gcc test.c -o test&lt;BR /&gt;/var/tmp/ccOI1Cxg.s: Assembler messages:&lt;BR /&gt;/var/tmp/ccOI1Cxg.s:4: Error: Unknown pseudo-op:  `.section'&lt;BR /&gt;/var/tmp/ccOI1Cxg.s:5: Fatal error: Not in a space.</description>
    <pubDate>Tue, 16 Oct 2001 17:15:17 GMT</pubDate>
    <dc:creator>scott park_1</dc:creator>
    <dc:date>2001-10-16T17:15:17Z</dc:date>
    <item>
      <title>ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595401#M33314</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I have installed gcc3.0 with swinstall.&lt;BR /&gt;The depot file was downloaded from &lt;BR /&gt;&lt;A href="http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html" target="_blank"&gt;http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html&lt;/A&gt;&lt;BR /&gt;,which includes binutil_2.11.&lt;BR /&gt;&lt;BR /&gt;And I compiled a  source.&lt;BR /&gt;Then I got the error below,&lt;BR /&gt;$gcc -o hello hello.c&lt;BR /&gt;/usr/ccs/bin/ld: Unrecognized argument: +Accept&lt;BR /&gt;/usr/ccs/bin/ld: Usage:  /usr/ccs/bin/ld [options] [flags] files&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;But,"gcc -c hello.c " works. &lt;BR /&gt;&lt;BR /&gt;Should I install GNU ld?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Oct 2001 03:52:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595401#M33314</guid>
      <dc:creator>Masashi Nakane</dc:creator>
      <dc:date>2001-10-16T03:52:16Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595402#M33315</link>
      <description>&lt;BR /&gt;gcc includes the linker (ld) so no need to install that separately.&lt;BR /&gt;&lt;BR /&gt;Looks like a problem with the install or bundle or the compiler not looking in the correct place for the linker. Are you using the 64 or 32bit version ? &lt;BR /&gt;&lt;BR /&gt;What source do you have for hello.c ?&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Oct 2001 06:20:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595402#M33315</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-16T06:20:02Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595403#M33316</link>
      <description>&lt;BR /&gt;Right, ive got the 64bit gcc3 installed and am ready to investigate your problem. Please explain it in as much detail as possible - exactly what you mean about aCC headers being included or not.</description>
      <pubDate>Tue, 16 Oct 2001 07:07:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595403#M33316</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-16T07:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595404#M33317</link>
      <description>The source is below,&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;main()&lt;BR /&gt;{&lt;BR /&gt;printf("hello!\n");&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;I could compile the source with (Bundle)cc.&lt;BR /&gt;And No problem with the outputed excutable,&lt;BR /&gt;which says "hello!".&lt;BR /&gt;&lt;BR /&gt;The system  is 9000/800/A400-44 PA8500 with Hp-UX 11.0 .So I believe this is 64bit .&lt;/STDIO.H&gt;</description>
      <pubDate>Tue, 16 Oct 2001 08:23:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595404#M33317</guid>
      <dc:creator>Masashi Nakane</dc:creator>
      <dc:date>2001-10-16T08:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595405#M33318</link>
      <description>&lt;BR /&gt;Ive deinstalled gcc 3.0 and installed 3.01 instead. Tried the same command;&lt;BR /&gt;&lt;BR /&gt;gcc -o hello hello.c&lt;BR /&gt;&lt;BR /&gt;And now I get;&lt;BR /&gt;&lt;BR /&gt;as: warning 2: Unknown option "--traditional-format" ignored.&lt;BR /&gt;as: "/var/tmp/ccKMVjib.s", line 22: error 1052: Directive name not recognized - NSUBSPA&lt;BR /&gt;&lt;BR /&gt;!!! Something is very strange here between gcc 3.0 and 3.01. The normal hp ANSI c compiler works fine.&lt;BR /&gt;Anyone know any more about this ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Oct 2001 09:11:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595405#M33318</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-16T09:11:21Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595406#M33319</link>
      <description>&lt;BR /&gt;ive found the answer. You must install binutils separately. Download and install the latest version below and it fixes the compile problem!&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/binutils-2.11.2/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/binutils-2.11.2/&lt;/A&gt;</description>
      <pubDate>Tue, 16 Oct 2001 09:30:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595406#M33319</guid>
      <dc:creator>Stefan Farrelly</dc:creator>
      <dc:date>2001-10-16T09:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595407#M33320</link>
      <description>I am having the exact same link problem:&lt;BR /&gt;&lt;BR /&gt;gcc test.c -o test&lt;BR /&gt;/usr/ccs/bin/ld: Unrecognized argument: +Accept&lt;BR /&gt;/usr/ccs/bin/ld: Usage:  /usr/ccs/bin/ld [options] [flags] files&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;&lt;BR /&gt;Downloading/installing the latest binutils (which has an earlier date (07/25) than those installed with the gcc bundled (08/15)) makes things worse: I get the following error:&lt;BR /&gt;&lt;BR /&gt;gcc test.c -o test&lt;BR /&gt;/var/tmp/ccOI1Cxg.s: Assembler messages:&lt;BR /&gt;/var/tmp/ccOI1Cxg.s:4: Error: Unknown pseudo-op:  `.section'&lt;BR /&gt;/var/tmp/ccOI1Cxg.s:5: Fatal error: Not in a space.</description>
      <pubDate>Tue, 16 Oct 2001 17:15:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595407#M33320</guid>
      <dc:creator>scott park_1</dc:creator>
      <dc:date>2001-10-16T17:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595408#M33321</link>
      <description>I finally gave up to make  the download work&lt;BR /&gt;gcc3-64-bin.depot&lt;BR /&gt;from &lt;BR /&gt;&lt;A href="http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html" target="_blank"&gt;http://dsportal.eservices.hp.com/dspp/tech/tech_TechSoftwareDetailPage_IDX/1,1703,547,00.html&lt;/A&gt; &lt;BR /&gt;&lt;BR /&gt;And As Stefan says ,I tried the other depots &lt;BR /&gt;gcc-3.0.1-sd-11.00.depot&lt;BR /&gt;binutils-2.11.2-sd-11.00.depot&lt;BR /&gt;&lt;BR /&gt;from &lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Gnu/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Gnu/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Then ,gcc works. Very happy!!!Thanks ,Stefan.&lt;BR /&gt;</description>
      <pubDate>Wed, 17 Oct 2001 11:46:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595408#M33321</guid>
      <dc:creator>Masashi Nakane</dc:creator>
      <dc:date>2001-10-17T11:46:58Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595409#M33322</link>
      <description>Yes, the&lt;BR /&gt;&lt;BR /&gt;gcc-3.0.1-sd-11.00.depot &lt;BR /&gt;binutils-2.11.2-sd-11.00.depot &lt;BR /&gt;&lt;BR /&gt;combo works.  But is it 64-bit?&lt;BR /&gt;&lt;BR /&gt;Here is my program:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;&lt;BR /&gt;/******************************************************************************/&lt;BR /&gt;main(int argv, char *argc)&lt;BR /&gt;{&lt;BR /&gt;        unsigned long   wtf;&lt;BR /&gt;/*&lt;BR /&gt;*       Print data&lt;BR /&gt;*/&lt;BR /&gt;        printf("\nSizeof(unsigned long) = %d\n", sizeof(wtf));&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;and here is the output:&lt;BR /&gt;&lt;BR /&gt;$ ./test&lt;BR /&gt;&lt;BR /&gt;Sizeof(unsigned long) = 4&lt;BR /&gt;&lt;BR /&gt;This seems to indicate that&lt;BR /&gt;"gcc-3.0.1-sd-11.00.depot" is a 32-bit compiler.&lt;/STDIO.H&gt;</description>
      <pubDate>Wed, 17 Oct 2001 14:17:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595409#M33322</guid>
      <dc:creator>scott park_1</dc:creator>
      <dc:date>2001-10-17T14:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595410#M33323</link>
      <description>This problem has come up in HP's opensource mailing-list (opensource@cup.hp.com)&lt;BR /&gt; There is a work around for the problem:&lt;BR /&gt;  make a fake /opt/langtools/lib/pa20_64/crt0.o link to&lt;BR /&gt; /usr/ccs/lib/pa20_64/crt0.o&lt;BR /&gt; { become root&lt;BR /&gt;   mkdir -r /opt/langtools/lib/pa20_64&lt;BR /&gt;   ln -s /usr/ccs/lib/pa20_64/crt0.o /opt/langtools/lib/pa20_64/crt0.o&lt;BR /&gt; }&lt;BR /&gt;  Be aware that you need to remove the symoblic link if you want to install&lt;BR /&gt; HP C/aCC compilers in future.&lt;BR /&gt;  We will fix this problem in the next release. &lt;BR /&gt;</description>
      <pubDate>Mon, 22 Oct 2001 17:41:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595410#M33323</guid>
      <dc:creator>Jessica Han</dc:creator>
      <dc:date>2001-10-22T17:41:36Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595411#M33324</link>
      <description>FWIW, this still hasn't been fixed.  But let me clarify a bit.  Maybe I am seeing it wrong.&lt;BR /&gt;&lt;BR /&gt;I installed the 3.0.2-64bit only  depot and it all appears to work ok.&lt;BR /&gt;&lt;BR /&gt;Compiling with -g requires /opt/langtools/lib[/pa20_64]/end.o,  which is only available with the HP Compiler kits.&lt;BR /&gt;&lt;BR /&gt;I found where the +Accept comes from.&lt;BR /&gt;&lt;BR /&gt;It is normal practice nowadays to pass -Wl [linker options] to the compiler which in its turn passes it to the linker.&lt;BR /&gt;&lt;BR /&gt;A common thing in GNU/GPL land is to do the following:&lt;BR /&gt;&lt;BR /&gt;CC=gcc&lt;BR /&gt;${CC} -shared -Wl,-soname -Wl,libfoo.so.1.0 -o libfoo.so.1.0.0&lt;BR /&gt;&lt;BR /&gt;The linker will get -soname, which it doesn't know and rejects, and then it gets the -Wl,libfoo, which causes it to come with the +Accept.&lt;BR /&gt;&lt;BR /&gt;Try the following:&lt;BR /&gt;&lt;BR /&gt;gcc -shared -Wl,l&lt;BR /&gt;&lt;BR /&gt;which will illustrate the point.&lt;BR /&gt;&lt;BR /&gt;The following will explain better what happens. [see attachment]&lt;BR /&gt;&lt;BR /&gt;Weird where that +Accept comes from though in gcc's passing to the linker.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jan 2002 15:20:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595411#M33324</guid>
      <dc:creator>Jeroen Ruigrok vd Werve_2</dc:creator>
      <dc:date>2002-01-14T15:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595412#M33325</link>
      <description>Btw, FWIW, that workaround with the symlink doesn't seem to do anything at all.&lt;BR /&gt;&lt;BR /&gt;Just a FYI.&lt;BR /&gt;&lt;BR /&gt;Also, the depot files at the HPPA are 32-bit only last time I checked.&lt;BR /&gt;&lt;BR /&gt;The ones you can download on the HP.com site are 32-bit and 64-bit and install in distinct directories.</description>
      <pubDate>Mon, 14 Jan 2002 15:33:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595412#M33325</guid>
      <dc:creator>Jeroen Ruigrok vd Werve_2</dc:creator>
      <dc:date>2002-01-14T15:33:43Z</dc:date>
    </item>
    <item>
      <title>Re: ld error when gcc-compiling</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595413#M33326</link>
      <description>One step further,&lt;BR /&gt;&lt;BR /&gt;from /usr/local/pa20_64/lib/gcc-lib/hppa64-hp-hpux11.00/3.0.2/specs&lt;BR /&gt;&lt;BR /&gt;under *link: [around line 35]&lt;BR /&gt;&lt;BR /&gt;You see:&lt;BR /&gt;&lt;BR /&gt;+Accept TypeMismatch -E %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}&lt;BR /&gt;&lt;BR /&gt;Remove the "+Accept TypeMismath".&lt;BR /&gt;&lt;BR /&gt;This will allow the commandline to display what it should've done in the first place:&lt;BR /&gt;&lt;BR /&gt;[srv3008 B.11.00]root /tmp/soft/bzip2-1.0.1 # gcc -shared -Wl,l &lt;BR /&gt;/usr/ccs/bin/ld: Can't open l&lt;BR /&gt;/usr/ccs/bin/ld: No such file or directory&lt;BR /&gt;&lt;BR /&gt;I'll see if I can hack the specs file some more to really work with this kind of behaviour people expect in their Makefiles.</description>
      <pubDate>Mon, 14 Jan 2002 15:50:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-error-when-gcc-compiling/m-p/2595413#M33326</guid>
      <dc:creator>Jeroen Ruigrok vd Werve_2</dc:creator>
      <dc:date>2002-01-14T15:50:49Z</dc:date>
    </item>
  </channel>
</rss>

