public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Compiling gcc-3.4.6 on sparc Solaris 9
@ 2022-07-13 18:54 Daniel Santos
  2022-07-13 19:47 ` Jonathan Wakely
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Santos @ 2022-07-13 18:54 UTC (permalink / raw)
  To: gcc-help

Hello community,

I am trying to build gcc on Sparc Solaris 9.
So far I am creating a directory sibling to the source distribution directory and running configure from there.
One thing I don’t understand is why the base configure script does not descend automatically to the gcc subfolder.
I have to go in there and run configure again.

While running configure with the command line : ../../gcc-3.4.6/gcc/configure —with-gnu-as —with-gnu-ld
and then make : it builds the files and when it gets to running ld I get the error :

/usr/local/sparc-sun-solaris2.9/bin/ld: target elf64-sparc not found

I am building this gcc with the same version installed via sunfkeeware packages.
The reason for building it is that I need objective-c support and the package does not have it.

This ld error indicates that the ld executable being run is from solaris, and not the gnu one I have in /usr/local/bin/ld

Can anyone shed some light on this ?

Thanks
Regards
Daniel Santos

Daniel Santos




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-13 18:54 Compiling gcc-3.4.6 on sparc Solaris 9 Daniel Santos
@ 2022-07-13 19:47 ` Jonathan Wakely
  2022-07-14  8:18   ` Rainer Orth
  0 siblings, 1 reply; 10+ messages in thread
From: Jonathan Wakely @ 2022-07-13 19:47 UTC (permalink / raw)
  To: Daniel Santos; +Cc: gcc-help, Rainer Orth

On Wed, 13 Jul 2022, 19:55 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hello community,
>
> I am trying to build gcc on Sparc Solaris 9.
> So far I am creating a directory sibling to the source distribution
> directory and running configure from there.
> One thing I don’t understand is why the base configure script does not
> descend automatically to the gcc subfolder.
> I have to go in there and run configure again.
>

Which shell are you using?

See https://gcc.gnu.org/install/specific.html#x-x-solaris2 where it says to
use ksh.


> While running configure with the command line :
> ../../gcc-3.4.6/gcc/configure —with-gnu-as —with-gnu-ld
> and then make : it builds the files and when it gets to running ld I get
> the error :
>
> /usr/local/sparc-sun-solaris2.9/bin/ld: target elf64-sparc not found
>
> I am building this gcc with the same version installed via sunfkeeware
> packages.


The reason for building it is that I need objective-c support and the
> package does not have it.
>
> This ld error indicates that the ld executable being run is from solaris,
> and not the gnu one I have in /usr/local/bin/ld
>
> Can anyone shed some light on this ?
>


The installation instructions do say to use the native linker, not the GNU
binutils one.
Again, see https://gcc.gnu.org/install/specific.html#x-x-solaris2

Passing --with-gnu-ld is wrong if it's finding and using the Solaris
linker. Either adjust your PATH so the GNU one is found first, or stop
telling GCC it's GNU ld when it isn't.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-13 19:47 ` Jonathan Wakely
@ 2022-07-14  8:18   ` Rainer Orth
  2022-07-14 18:40     ` Daniel Santos
  0 siblings, 1 reply; 10+ messages in thread
From: Rainer Orth @ 2022-07-14  8:18 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: Daniel Santos, gcc-help

Jonathan Wakely <jwakely.gcc@gmail.com> writes:

> On Wed, 13 Jul 2022, 19:55 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org>
> wrote:
>
>  Hello community,
>
>  I am trying to build gcc on Sparc Solaris 9.
>  So far I am creating a directory sibling to the source distribution directory and
>  running configure from there.
>  One thing I don’t understand is why the base configure script does not descend
>  automatically to the gcc subfolder.
>  I have to go in there and run configure again.
>
> Which shell are you using?
>
> See https://gcc.gnu.org/install/specific.html#x-x-solaris2 where it says to use ksh.
>
>  While running configure with the command line : ../../gcc-3.4.6/gcc/configure
>  —with-gnu-as —with-gnu-ld
>  and then make : it builds the files and when it gets to running ld I get the error :
>
>  /usr/local/sparc-sun-solaris2.9/bin/ld: target elf64-sparc not found
>
>  I am building this gcc with the same version installed via sunfkeeware
>  packages.
>
>  The reason for building it is that I need objective-c support and the package
>  does not have it.
>
>  This ld error indicates that the ld executable being run is from solaris, and not
>  the gnu one I have in /usr/local/bin/ld
>
>  Can anyone shed some light on this ?
>
> The installation instructions do say to use the native linker, not the GNU binutils
> one.
> Again, see https://gcc.gnu.org/install/specific.html#x-x-solaris2
>
> Passing --with-gnu-ld is wrong if it's finding and using the Solaris linker. Either
> adjust your PATH so the GNU one is found first, or stop telling GCC it's GNU ld when
> it isn't.

Besides, because GCC on Solaris supports two incompatible versions of ld
(Solaris ld and GNU ld), it is crucial to specify the path to the linker
you want to configure with with --with-ld=<path to ld> (both for
/usr/ccs/bin/ld and some version of GNU ld).  Otherwise, PATH changes
would randomly break the resulting gcc.

If you really want to use GNU ld (I don't know why you would, though),
please build and use a recent one: at least what's recommended in
install.texi.  You'd probably be able to use GNU ld from current
binutils 2.38, too.

On top of that, I wouldn't bother with GCC 3.4 at all.  Instead, please
use the latest release still supporting Solaris 9, GCC 4.9.4 It's way
better tested and supported than the ancient GCC 3.4.  Please consult
the Solaris sections of the bundled install docs in
gcc/doc/install.texi.  It contains many hints and caveats to consider
when building GCC.  The online version on gcc.gnu.org is for GCC trunk
only: everything pertaining to Solaris versions no longer supported
(i.e. before Solaris 11.3) has been removed.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-14  8:18   ` Rainer Orth
@ 2022-07-14 18:40     ` Daniel Santos
  2022-07-14 18:50       ` Jonathan Wakely
  2022-07-14 18:50       ` Rainer Orth
  0 siblings, 2 replies; 10+ messages in thread
From: Daniel Santos @ 2022-07-14 18:40 UTC (permalink / raw)
  To: Rainer Orth; +Cc: Jonathan Wakely, gcc-help

Hello,

As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?
While sticking to the 3.4.6 version, I removed the solaris ld out of the way and am building it with gnu ld.

Right now I have the following error :

rm -f libv3test.a
ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o 
ranlib libv3test.a
touch testsuite_wchar_t
/export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
  /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
/bin/ksh: /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files: cannot execute
make[6]: *** [testsuite_files] Error 126
make[6]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/sparcv9/libstdc++-v3/testsuite'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/sparcv9/libstdc++-v3'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/sparcv9/libstdc++-v3'
make[3]: *** [multi-do] Error 1
make[3]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/libstdc++-v3'
make[2]: *** [all-multi] Error 2
make[2]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/libstdc++-v3'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/export/home/dlsa/code/gcc-3.4.6-build/sparc-sun-solaris2.9/libstdc++-v3'
make: *** [all-target-libstdc++-v3] Error 2

Can anyone help me understand what this means ?
Thanks
Regards
Daniel Santos



> On 14 Jul 2022, at 09:18, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> 
> Jonathan Wakely <jwakely.gcc@gmail.com> writes:
> 
>> On Wed, 13 Jul 2022, 19:55 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org>
>> wrote:
>> 
>> Hello community,
>> 
>> I am trying to build gcc on Sparc Solaris 9.
>> So far I am creating a directory sibling to the source distribution directory and
>> running configure from there.
>> One thing I don’t understand is why the base configure script does not descend
>> automatically to the gcc subfolder.
>> I have to go in there and run configure again.
>> 
>> Which shell are you using?
>> 
>> See https://gcc.gnu.org/install/specific.html#x-x-solaris2 where it says to use ksh.
>> 
>> While running configure with the command line : ../../gcc-3.4.6/gcc/configure
>> —with-gnu-as —with-gnu-ld
>> and then make : it builds the files and when it gets to running ld I get the error :
>> 
>> /usr/local/sparc-sun-solaris2.9/bin/ld: target elf64-sparc not found
>> 
>> I am building this gcc with the same version installed via sunfkeeware
>> packages.
>> 
>> The reason for building it is that I need objective-c support and the package
>> does not have it.
>> 
>> This ld error indicates that the ld executable being run is from solaris, and not
>> the gnu one I have in /usr/local/bin/ld
>> 
>> Can anyone shed some light on this ?
>> 
>> The installation instructions do say to use the native linker, not the GNU binutils
>> one.
>> Again, see https://gcc.gnu.org/install/specific.html#x-x-solaris2
>> 
>> Passing --with-gnu-ld is wrong if it's finding and using the Solaris linker. Either
>> adjust your PATH so the GNU one is found first, or stop telling GCC it's GNU ld when
>> it isn't.
> 
> Besides, because GCC on Solaris supports two incompatible versions of ld
> (Solaris ld and GNU ld), it is crucial to specify the path to the linker
> you want to configure with with --with-ld=<path to ld> (both for
> /usr/ccs/bin/ld and some version of GNU ld).  Otherwise, PATH changes
> would randomly break the resulting gcc.
> 
> If you really want to use GNU ld (I don't know why you would, though),
> please build and use a recent one: at least what's recommended in
> install.texi.  You'd probably be able to use GNU ld from current
> binutils 2.38, too.
> 
> On top of that, I wouldn't bother with GCC 3.4 at all.  Instead, please
> use the latest release still supporting Solaris 9, GCC 4.9.4 It's way
> better tested and supported than the ancient GCC 3.4.  Please consult
> the Solaris sections of the bundled install docs in
> gcc/doc/install.texi.  It contains many hints and caveats to consider
> when building GCC.  The online version on gcc.gnu.org is for GCC trunk
> only: everything pertaining to Solaris versions no longer supported
> (i.e. before Solaris 11.3) has been removed.
> 
> 	Rainer
> 
> -- 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-14 18:40     ` Daniel Santos
@ 2022-07-14 18:50       ` Jonathan Wakely
  2022-07-14 18:50       ` Rainer Orth
  1 sibling, 0 replies; 10+ messages in thread
From: Jonathan Wakely @ 2022-07-14 18:50 UTC (permalink / raw)
  To: Daniel Santos; +Cc: Rainer Orth, gcc-help

On Thu, 14 Jul 2022 at 19:40, Daniel Santos <daniel.dlds@gmail.com> wrote:
>
> Hello,
>
> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?

Yes.

> While sticking to the 3.4.6 version, I removed the solaris ld out of the way and am building it with gnu ld.
>
> Right now I have the following error :
>
> rm -f libv3test.a
> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o
> ranlib libv3test.a
> touch testsuite_wchar_t
> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
>   /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
> /bin/ksh: /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files: cannot execute

It's telling you it can't execute the script.

Is that file executable? It should be.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-14 18:40     ` Daniel Santos
  2022-07-14 18:50       ` Jonathan Wakely
@ 2022-07-14 18:50       ` Rainer Orth
  2022-07-15 18:10         ` Daniel Santos
  1 sibling, 1 reply; 10+ messages in thread
From: Rainer Orth @ 2022-07-14 18:50 UTC (permalink / raw)
  To: Daniel Santos; +Cc: Jonathan Wakely, gcc-help

Hi Daniel,

> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?

as documented in install.texi (you absolute need to check it!), GCC 4.9
requires a ISO C++98 compiler, so GC 3.4.6 should be good.  If all else
fails, you need to take some intermediate step (like GCC 4.7 which only
needed an ISO C89 compiler).

> While sticking to the 3.4.6 version, I removed the solaris ld out of the

Don't mess around with the installed /usr/ccs/bin/ld.  Just pass
--with-ld=<your desired ld> (and --with-gnu-ld or --without-gnu-ld as
needed.

> way and am building it with gnu ld.

Again: why are you so adamant on using GNU ld here?  Solaris ld works
way better.

> Right now I have the following error :
>
> rm -f libv3test.a
> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o 
> ranlib libv3test.a
> touch testsuite_wchar_t
> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
>   /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
> /bin/ksh:
> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files:
> cannot execute

That script hardcodes /bin/sh which on Solaris 9 probably isn't able to
execute that script.  The invocation should be prefixed with $(SHELL)
(initialized from $CONFIG_SHELL) instead.

I'm pretty certain issues like this have been resolved for GCC 4.9/4.8,
so you'd better not bother with GCC 3.4 anymore.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-14 18:50       ` Rainer Orth
@ 2022-07-15 18:10         ` Daniel Santos
  2022-07-15 19:08           ` Jonathan Wakely
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Santos @ 2022-07-15 18:10 UTC (permalink / raw)
  To: gcc-help

Hello,

I downloader gcc-4.9.4 sources and did a ./configure just to see what it was the output. 

bash-2.05$ cd ../gcc-4.9.4
bash-2.05$ ./configure
configure: loading cache /dev/null
./configure: ./configure:: No such file or directory
checking build system type... sparc-sun-solaris2.9
checking host system type... sparc-sun-solaris2.9
checking target system type... sparc-sun-solaris2.9
checking for a BSD-compatible install... ./install-sh -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking for libatomic support... yes
checking for libcilkrts support... no
checking for libitm support... yes
checking for libsanitizer support... no
checking for libvtv support... no
checking for gcc... gcc
checking for C compiler default output file name... 
configure: error: in `/export/home/dlsa/code/gcc-4.9.4':
configure: error: C compiler cannot create executables
See `config.log' for more details.

In config.log I have the following :

configure:4249: $? = 0
configure:4238: gcc -v >&5
Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
Thread model: posix
gcc version 3.4.6
configure:4249: $? = 0
configure:4238: gcc -V >&5
gcc: `-V' option must have argument
configure:4249: $? = 1
configure:4238: gcc -qversion >&5
gcc: unrecognized option `-qversion'
gcc: no input files
configure:4249: $? = 1
configure:4269: checking for C compiler default output file name
configure:4291: gcc    conftest.c  >&5
gcc: installation problem, cannot exec `cc1': No such file or directory
configure:4295: $? = 1
configure:4332: result: 
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:4338: error: in `/export/home/dlsa/code/gcc-4.9.4':
configure:4342: error: C compiler cannot create executables
See `config.log' for more details.

Most notably I saw the error : gcc: installation problem, cannot exec `cc1': No such file or directory
But isn’t cc1 the SUN C compiler ? I don’t have it.

Also, to see the documentation I installed tetex on the machine and then did a texi2html install.texi and got :

bash-2.05$ export PATH=/usr/local/teTeX/bin/sparc-sun-solaris2.9/:$PATH
bash-2.05$ pwd       
/export/home/dlsa/code/gcc-4.9.4/gcc/doc
bash-2.05$ texi2html install.texi
*** Can't find gcc-common.texi, skipping (l. 10)
** empty document
bash-2.05$ 

Any help appreciated.

Thanks,
Regards
Daniel Santos



> On 14 Jul 2022, at 19:50, Rainer Orth <ro@cebitec.uni-bielefeld.de> wrote:
> 
> Hi Daniel,
> 
>> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?
> 
> as documented in install.texi (you absolute need to check it!), GCC 4.9
> requires a ISO C++98 compiler, so GC 3.4.6 should be good.  If all else
> fails, you need to take some intermediate step (like GCC 4.7 which only
> needed an ISO C89 compiler).
> 
>> While sticking to the 3.4.6 version, I removed the solaris ld out of the
> 
> Don't mess around with the installed /usr/ccs/bin/ld.  Just pass
> --with-ld=<your desired ld> (and --with-gnu-ld or --without-gnu-ld as
> needed.
> 
>> way and am building it with gnu ld.
> 
> Again: why are you so adamant on using GNU ld here?  Solaris ld works
> way better.
> 
>> Right now I have the following error :
>> 
>> rm -f libv3test.a
>> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o 
>> ranlib libv3test.a
>> touch testsuite_wchar_t
>> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
>>  /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
>> /bin/ksh:
>> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files:
>> cannot execute
> 
> That script hardcodes /bin/sh which on Solaris 9 probably isn't able to
> execute that script.  The invocation should be prefixed with $(SHELL)
> (initialized from $CONFIG_SHELL) instead.
> 
> I'm pretty certain issues like this have been resolved for GCC 4.9/4.8,
> so you'd better not bother with GCC 3.4 anymore.
> 
> 	Rainer
> 
> -- 
> -----------------------------------------------------------------------------
> Rainer Orth, Center for Biotechnology, Bielefeld University


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-15 18:10         ` Daniel Santos
@ 2022-07-15 19:08           ` Jonathan Wakely
  2022-07-16 18:54             ` Daniel Santos
  2022-07-17 19:40             ` Daniel Santos
  0 siblings, 2 replies; 10+ messages in thread
From: Jonathan Wakely @ 2022-07-15 19:08 UTC (permalink / raw)
  To: Daniel Santos; +Cc: gcc-help

On Fri, 15 Jul 2022, 19:11 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org>
wrote:

> Hello,
>
> I downloader gcc-4.9.4 sources and did a ./configure just to see what it
> was the output.
>
> bash-2.05$ cd ../gcc-4.9.4
> bash-2.05$ ./configure
> configure: loading cache /dev/null
> ./configure: ./configure:: No such file or directory
> checking build system type... sparc-sun-solaris2.9
> checking host system type... sparc-sun-solaris2.9
> checking target system type... sparc-sun-solaris2.9
> checking for a BSD-compatible install... ./install-sh -c
> checking whether ln works... yes
> checking whether ln -s works... yes
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking for libatomic support... yes
> checking for libcilkrts support... no
> checking for libitm support... yes
> checking for libsanitizer support... no
> checking for libvtv support... no
> checking for gcc... gcc
> checking for C compiler default output file name...
> configure: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
>
> In config.log I have the following :
>
> configure:4249: $? = 0
> configure:4238: gcc -v >&5
> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
> Configured with: ../configure --with-as=/usr/ccs/bin/as
> --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
> Thread model: posix
> gcc version 3.4.6
> configure:4249: $? = 0
> configure:4238: gcc -V >&5
> gcc: `-V' option must have argument
> configure:4249: $? = 1
> configure:4238: gcc -qversion >&5
> gcc: unrecognized option `-qversion'
> gcc: no input files
> configure:4249: $? = 1
> configure:4269: checking for C compiler default output file name
> configure:4291: gcc    conftest.c  >&5
> gcc: installation problem, cannot exec `cc1': No such file or directory
> configure:4295: $? = 1
> configure:4332: result:
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
> configure:4338: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure:4342: error: C compiler cannot create executables
> See `config.log' for more details.
>
> Most notably I saw the error : gcc: installation problem, cannot exec
> `cc1': No such file or directory
> But isn’t cc1 the SUN C compiler ?


No, you're thinking of cc.

cc1 is GCC's C compiler. Your GCC installation is broken if the 'gcc'
driver cannot find its own 'cc1' executable.



I don’t have it.
>
> Also, to see the documentation I installed tetex on the machine and then
> did a texi2html install.texi and got :
>
> bash-2.05$ export PATH=/usr/local/teTeX/bin/sparc-sun-solaris2.9/:$PATH
> bash-2.05$ pwd
> /export/home/dlsa/code/gcc-4.9.4/gcc/doc
> bash-2.05$ texi2html install.texi
> *** Can't find gcc-common.texi, skipping (l. 10)
> ** empty document
> bash-2.05$
>
> Any help appreciated.
>
> Thanks,
> Regards
> Daniel Santos
>
>
>
> > On 14 Jul 2022, at 19:50, Rainer Orth <ro@cebitec.uni-bielefeld.de>
> wrote:
> >
> > Hi Daniel,
> >
> >> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build
> it ?
> >
> > as documented in install.texi (you absolute need to check it!), GCC 4.9
> > requires a ISO C++98 compiler, so GC 3.4.6 should be good.  If all else
> > fails, you need to take some intermediate step (like GCC 4.7 which only
> > needed an ISO C89 compiler).
> >
> >> While sticking to the 3.4.6 version, I removed the solaris ld out of the
> >
> > Don't mess around with the installed /usr/ccs/bin/ld.  Just pass
> > --with-ld=<your desired ld> (and --with-gnu-ld or --without-gnu-ld as
> > needed.
> >
> >> way and am building it with gnu ld.
> >
> > Again: why are you so adamant on using GNU ld here?  Solaris ld works
> > way better.
> >
> >> Right now I have the following error :
> >>
> >> rm -f libv3test.a
> >> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o
> testsuite_hooks.o
> >> ranlib libv3test.a
> >> touch testsuite_wchar_t
> >>
> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files
> \
> >>  /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
> >> /bin/ksh:
> >>
> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files:
> >> cannot execute
> >
> > That script hardcodes /bin/sh which on Solaris 9 probably isn't able to
> > execute that script.  The invocation should be prefixed with $(SHELL)
> > (initialized from $CONFIG_SHELL) instead.
> >
> > I'm pretty certain issues like this have been resolved for GCC 4.9/4.8,
> > so you'd better not bother with GCC 3.4 anymore.
> >
> >       Rainer
> >
> > --
> >
> -----------------------------------------------------------------------------
> > Rainer Orth, Center for Biotechnology, Bielefeld University
>
>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-15 19:08           ` Jonathan Wakely
@ 2022-07-16 18:54             ` Daniel Santos
  2022-07-17 19:40             ` Daniel Santos
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Santos @ 2022-07-16 18:54 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: gcc-help

Hello,

So I re-installed the gcc 3.4.6 from sunfkeeware packages. I am now able to do ./configure on the gcc base directory.
I got gmp-4.3.2, mpfr-2.4.2 and mpc-1.0.1 sources because gcc depends on them.
I compiled gmp-4.3.2 and it finished. I then did a ‘make check’ and at the end of the output i got :

make  check-TESTS
make[4]: Entering directory `/export/home/dlsa/code/gmp-4.3.2/tests'
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-bswap: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-bswap
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-constants: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-constants
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-count_zeros: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-count_zeros
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-gmpmax: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-gmpmax
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-hightomask: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-hightomask
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-modlinv: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-modlinv
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-popc: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-popc
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-parity: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-parity
ld.so.1: /export/home/dlsa/code/gmp-4.3.2/tests/.libs/t-sub: fatal: /usr/local/lib/libgcc_s.so.1: wrong ELF class: ELFCLASS32
FAIL: t-sub
====================================
9 of 9 tests failed
Please report to gmp-bugs@gmplib.org
====================================
make[4]: *** [check-TESTS] Error 1
make[4]: Leaving directory `/export/home/dlsa/code/gmp-4.3.2/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/export/home/dlsa/code/gmp-4.3.2/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/export/home/dlsa/code/gmp-4.3.2/tests'
make[1]: *** [check-recursive] Error 1
make[1]: Leaving directory `/export/home/dlsa/code/gmp-4.3.2'
make: *** [check] Error 2

Which probably means that the gcc version I have installed is 32 bit. Am I correct ?
Can it be used to build a 64 bit 4.9.4 gcc ?

Thanks,
Regards
Daniel Santos



> On 15 Jul 2022, at 20:08, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 
> 
> 
> On Fri, 15 Jul 2022, 19:11 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org>> wrote:
> Hello,
> 
> I downloader gcc-4.9.4 sources and did a ./configure just to see what it was the output. 
> 
> bash-2.05$ cd ../gcc-4.9.4
> bash-2.05$ ./configure
> configure: loading cache /dev/null
> ./configure: ./configure:: No such file or directory
> checking build system type... sparc-sun-solaris2.9
> checking host system type... sparc-sun-solaris2.9
> checking target system type... sparc-sun-solaris2.9
> checking for a BSD-compatible install... ./install-sh -c
> checking whether ln works... yes
> checking whether ln -s works... yes
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking for libatomic support... yes
> checking for libcilkrts support... no
> checking for libitm support... yes
> checking for libsanitizer support... no
> checking for libvtv support... no
> checking for gcc... gcc
> checking for C compiler default output file name... 
> configure: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> In config.log I have the following :
> 
> configure:4249: $? = 0
> configure:4238: gcc -v >&5
> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
> Thread model: posix
> gcc version 3.4.6
> configure:4249: $? = 0
> configure:4238: gcc -V >&5
> gcc: `-V' option must have argument
> configure:4249: $? = 1
> configure:4238: gcc -qversion >&5
> gcc: unrecognized option `-qversion'
> gcc: no input files
> configure:4249: $? = 1
> configure:4269: checking for C compiler default output file name
> configure:4291: gcc    conftest.c  >&5
> gcc: installation problem, cannot exec `cc1': No such file or directory
> configure:4295: $? = 1
> configure:4332: result: 
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h.  */
> | 
> | int
> | main ()
> | {
> | 
> |   ;
> |   return 0;
> | }
> configure:4338: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure:4342: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> Most notably I saw the error : gcc: installation problem, cannot exec `cc1': No such file or directory
> But isn’t cc1 the SUN C compiler ?
> 
> No, you're thinking of cc.
> 
> cc1 is GCC's C compiler. Your GCC installation is broken if the 'gcc' driver cannot find its own 'cc1' executable.
> 
> 
> 
> I don’t have it.
> 
> Also, to see the documentation I installed tetex on the machine and then did a texi2html install.texi and got :
> 
> bash-2.05$ export PATH=/usr/local/teTeX/bin/sparc-sun-solaris2.9/:$PATH
> bash-2.05$ pwd       
> /export/home/dlsa/code/gcc-4.9.4/gcc/doc
> bash-2.05$ texi2html install.texi
> *** Can't find gcc-common.texi, skipping (l. 10)
> ** empty document
> bash-2.05$ 
> 
> Any help appreciated.
> 
> Thanks,
> Regards
> Daniel Santos
> 
> 
> 
> > On 14 Jul 2022, at 19:50, Rainer Orth <ro@cebitec.uni-bielefeld.de <mailto:ro@cebitec.uni-bielefeld.de>> wrote:
> > 
> > Hi Daniel,
> > 
> >> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?
> > 
> > as documented in install.texi (you absolute need to check it!), GCC 4.9
> > requires a ISO C++98 compiler, so GC 3.4.6 should be good.  If all else
> > fails, you need to take some intermediate step (like GCC 4.7 which only
> > needed an ISO C89 compiler).
> > 
> >> While sticking to the 3.4.6 version, I removed the solaris ld out of the
> > 
> > Don't mess around with the installed /usr/ccs/bin/ld.  Just pass
> > --with-ld=<your desired ld> (and --with-gnu-ld or --without-gnu-ld as
> > needed.
> > 
> >> way and am building it with gnu ld.
> > 
> > Again: why are you so adamant on using GNU ld here?  Solaris ld works
> > way better.
> > 
> >> Right now I have the following error :
> >> 
> >> rm -f libv3test.a
> >> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o 
> >> ranlib libv3test.a
> >> touch testsuite_wchar_t
> >> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
> >>  /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
> >> /bin/ksh:
> >> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files:
> >> cannot execute
> > 
> > That script hardcodes /bin/sh which on Solaris 9 probably isn't able to
> > execute that script.  The invocation should be prefixed with $(SHELL)
> > (initialized from $CONFIG_SHELL) instead.
> > 
> > I'm pretty certain issues like this have been resolved for GCC 4.9/4.8,
> > so you'd better not bother with GCC 3.4 anymore.
> > 
> >       Rainer
> > 
> > -- 
> > -----------------------------------------------------------------------------
> > Rainer Orth, Center for Biotechnology, Bielefeld University
> 


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Compiling gcc-3.4.6 on sparc Solaris 9
  2022-07-15 19:08           ` Jonathan Wakely
  2022-07-16 18:54             ` Daniel Santos
@ 2022-07-17 19:40             ` Daniel Santos
  1 sibling, 0 replies; 10+ messages in thread
From: Daniel Santos @ 2022-07-17 19:40 UTC (permalink / raw)
  To: gcc-help

I ended up starting over and deleting the previous build. I was trying to build the prerequisites libraries from source by downloading them myself and doing the build.

I then knew of the ./contrib/download_prerequisites script and ran that.
I then did : 
# ../gcc-4.9.4/configure --enable-languages=c,c++,objc,fortran,java --enable-obsolete --prefix=/usr/local --with-gnu-as
and then:
# make

Currently I have the following

sparcv9/libgcc_s.so.1 && ln -s libgcc_s.so.1 sparcv9/libgcc_s.so
/usr/local/sparc-sun-solaris2.9/bin/ld: cannot find libgcc-unwind.map: No such file or directory
/usr/local/sparc-sun-solaris2.9/bin/ld: skipping incompatible /lib/sparcv9/libc.so when searching for -lc
/usr/local/sparc-sun-solaris2.9/bin/ld: skipping incompatible /usr/lib/sparcv9/libc.so when searching for -lc
/usr/local/sparc-sun-solaris2.9/bin/ld: skipping incompatible /lib/sparcv9/libc.so when searching for -lc
/usr/local/sparc-sun-solaris2.9/bin/ld: skipping incompatible /usr/lib/sparcv9/libc.so when searching for -lc
collect2: error: ld returned 1 exit status
make[5]: *** [libgcc_s.so] Error 1
make[5]: Leaving directory `/export/home/dlsa/code/gcc-4.9.4-build/sparc-sun-solaris2.9/sparcv9/libgcc'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/export/home/dlsa/code/gcc-4.9.4-build/sparc-sun-solaris2.9/libgcc'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/export/home/dlsa/code/gcc-4.9.4-build/sparc-sun-solaris2.9/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/export/home/dlsa/code/gcc-4.9.4-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/export/home/dlsa/code/gcc-4.9.4-build'
make: *** [all] Error 2

I have no idea. Anyone can help me ?
Thanks,
Regards
Daniel Santos



> On 15 Jul 2022, at 20:08, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> 
> 
> 
> On Fri, 15 Jul 2022, 19:11 Daniel Santos via Gcc-help, <gcc-help@gcc.gnu.org <mailto:gcc-help@gcc.gnu.org>> wrote:
> Hello,
> 
> I downloader gcc-4.9.4 sources and did a ./configure just to see what it was the output. 
> 
> bash-2.05$ cd ../gcc-4.9.4
> bash-2.05$ ./configure
> configure: loading cache /dev/null
> ./configure: ./configure:: No such file or directory
> checking build system type... sparc-sun-solaris2.9
> checking host system type... sparc-sun-solaris2.9
> checking target system type... sparc-sun-solaris2.9
> checking for a BSD-compatible install... ./install-sh -c
> checking whether ln works... yes
> checking whether ln -s works... yes
> checking for a sed that does not truncate output... /usr/bin/sed
> checking for gawk... no
> checking for mawk... no
> checking for nawk... nawk
> checking for libatomic support... yes
> checking for libcilkrts support... no
> checking for libitm support... yes
> checking for libsanitizer support... no
> checking for libvtv support... no
> checking for gcc... gcc
> checking for C compiler default output file name... 
> configure: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> In config.log I have the following :
> 
> configure:4249: $? = 0
> configure:4238: gcc -v >&5
> Reading specs from /usr/local/lib/gcc/sparc-sun-solaris2.9/3.4.6/specs
> Configured with: ../configure --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++,f77
> Thread model: posix
> gcc version 3.4.6
> configure:4249: $? = 0
> configure:4238: gcc -V >&5
> gcc: `-V' option must have argument
> configure:4249: $? = 1
> configure:4238: gcc -qversion >&5
> gcc: unrecognized option `-qversion'
> gcc: no input files
> configure:4249: $? = 1
> configure:4269: checking for C compiler default output file name
> configure:4291: gcc    conftest.c  >&5
> gcc: installation problem, cannot exec `cc1': No such file or directory
> configure:4295: $? = 1
> configure:4332: result: 
> configure: failed program was:
> | /* confdefs.h */
> | #define PACKAGE_NAME ""
> | #define PACKAGE_TARNAME ""
> | #define PACKAGE_VERSION ""
> | #define PACKAGE_STRING ""
> | #define PACKAGE_BUGREPORT ""
> | #define PACKAGE_URL ""
> | /* end confdefs.h.  */
> | 
> | int
> | main ()
> | {
> | 
> |   ;
> |   return 0;
> | }
> configure:4338: error: in `/export/home/dlsa/code/gcc-4.9.4':
> configure:4342: error: C compiler cannot create executables
> See `config.log' for more details.
> 
> Most notably I saw the error : gcc: installation problem, cannot exec `cc1': No such file or directory
> But isn’t cc1 the SUN C compiler ? 
> 
> No, you're thinking of cc.
> 
> cc1 is GCC's C compiler. Your GCC installation is broken if the 'gcc' driver cannot find its own 'cc1' executable.
> 
> 
> 
> I don’t have it.
> 
> Also, to see the documentation I installed tetex on the machine and then did a texi2html install.texi and got :
> 
> bash-2.05$ export PATH=/usr/local/teTeX/bin/sparc-sun-solaris2.9/:$PATH
> bash-2.05$ pwd       
> /export/home/dlsa/code/gcc-4.9.4/gcc/doc
> bash-2.05$ texi2html install.texi
> *** Can't find gcc-common.texi, skipping (l. 10)
> ** empty document
> bash-2.05$ 
> 
> Any help appreciated.
> 
> Thanks,
> Regards
> Daniel Santos
> 
> 
> 
> > On 14 Jul 2022, at 19:50, Rainer Orth <ro@cebitec.uni-bielefeld.de <mailto:ro@cebitec.uni-bielefeld.de>> wrote:
> > 
> > Hi Daniel,
> > 
> >> As to switching to gcc 4.9, can my currently installed gcc 3.4.6 build it ?
> > 
> > as documented in install.texi (you absolute need to check it!), GCC 4.9
> > requires a ISO C++98 compiler, so GC 3.4.6 should be good.  If all else
> > fails, you need to take some intermediate step (like GCC 4.7 which only
> > needed an ISO C89 compiler).
> > 
> >> While sticking to the 3.4.6 version, I removed the solaris ld out of the
> > 
> > Don't mess around with the installed /usr/ccs/bin/ld.  Just pass
> > --with-ld=<your desired ld> (and --with-gnu-ld or --without-gnu-ld as
> > needed.
> > 
> >> way and am building it with gnu ld.
> > 
> > Again: why are you so adamant on using GNU ld here?  Solaris ld works
> > way better.
> > 
> >> Right now I have the following error :
> >> 
> >> rm -f libv3test.a
> >> ar cru libv3test.a testsuite_abi.o testsuite_allocator.o testsuite_hooks.o 
> >> ranlib libv3test.a
> >> touch testsuite_wchar_t
> >> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files \
> >>  /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/testsuite `${PWDCMD-pwd}`
> >> /bin/ksh:
> >> /export/home/dlsa/code/gcc-3.4.6/libstdc++-v3/scripts/create_testsuite_files:
> >> cannot execute
> > 
> > That script hardcodes /bin/sh which on Solaris 9 probably isn't able to
> > execute that script.  The invocation should be prefixed with $(SHELL)
> > (initialized from $CONFIG_SHELL) instead.
> > 
> > I'm pretty certain issues like this have been resolved for GCC 4.9/4.8,
> > so you'd better not bother with GCC 3.4 anymore.
> > 
> >       Rainer
> > 
> > -- 
> > -----------------------------------------------------------------------------
> > Rainer Orth, Center for Biotechnology, Bielefeld University


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-07-17 19:40 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 18:54 Compiling gcc-3.4.6 on sparc Solaris 9 Daniel Santos
2022-07-13 19:47 ` Jonathan Wakely
2022-07-14  8:18   ` Rainer Orth
2022-07-14 18:40     ` Daniel Santos
2022-07-14 18:50       ` Jonathan Wakely
2022-07-14 18:50       ` Rainer Orth
2022-07-15 18:10         ` Daniel Santos
2022-07-15 19:08           ` Jonathan Wakely
2022-07-16 18:54             ` Daniel Santos
2022-07-17 19:40             ` Daniel Santos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).