[OpenIndiana-discuss] g++ 4.6 from SFE repository

Ewald Ertl ewald.ertl at gmail.com
Fri Jan 13 17:02:55 UTC 2012


Hello again,



On Thu, Jan 12, 2012 at 11:19 AM, Ewald Ertl <ewald.ertl at gmail.com> wrote:
> Hello,
>
> I'm trying to compile a simple C++ file on my OpenIndiana 151a with
> the g++ from the SFE repository.
>
> root at solewer:/usr/gcc/4.6# g++ --version
> g++ (GCC) 4.6.2
> Copyright (C) 2011 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>
> But this results in a lot of errors during the assembly stage:
> root at solewer:~# g++ a.cpp
> Assembler: a.cpp
>     "/var/tmp//cclAa4ot.s", line 80 : Syntax error
>     Near line: "    .uleb128 .LLSDACSE549-.LLSDACSB549"
>     "/var/tmp//cclAa4ot.s", line 82 : Syntax error
>     Near line: "    .uleb128 .LEHB0-.LFB549"
>     "/var/tmp//cclAa4ot.s", line 83 : Syntax error
>     Near line: "    .uleb128 .LEHE0-.LEHB0"
>
>
> With the g++ from /usr/sfw/bin ( pkg://openindiana.org/developer/gcc-3
> )  the compilation succeeded.
>
> I've now started with execsnoop to see whats happening:
>
> g++ from the SFE repository uses the default assembler:
>  UID    PID   PPID ARGS
>     0   7755   7662 g++ a.cpp
>     0   7756   7755
> /usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/cc1plus -quiet a.cpp
> -quiet -dum
>     0   7758   7662 /usr/bin/hostname
>     0   7757   7755 /usr/ccs/bin/as -s -o /var/tmp//ccYHayjp.o

Now I had some time to investigate further.

The usage of the assembler under ccs is the problem. I searched for
other assemblers on my system and found:
root at solewer:/usr# find . -name as -print
./gnu/i386-pc-solaris2.11/bin/as
./bin/as
./sfw/libexec/gcc/i386-pc-solaris2.11/3.4.3/as
./ccs/bin/as
./share/locale/as

But the searchpath of gcc does not search in /usr/gnu:

[ewer at solewer:~/tmp]$g++ -print-search-dirs
...
programs: =/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/../../../../i386-pc-solaris2.11/bin/i386-pc-solaris2.11/4.6.2/:/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.2/../../../../i386-pc-solaris2.11/bin/:/usr/ccs/bin/i386-pc-solaris2.11/4.6.2/:/usr/ccs/bin/
...

Programs are only search in the /usr/gcc/4.6 folders. So I made a soft
link from
/usr/gcc/4.6/i386-pc-solaris2.11 -> /usr/gnu/i386-pc-solaris2.11/

After this link the compilation and linking works again without
problems and the
created executeables can run.

But I don't know why this has changed. Because I found that I've
already compiled
programs with the GCC from the SFE repository.

Greetings
Ewald



More information about the OpenIndiana-discuss mailing list