public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mark Butt <mark@markwbutt.com>
To: gcc-help@gcc.gnu.org
Subject: Building and install GCC 8.3.0, OpenBSD 7.2 on DEC Alpha EV5
Date: Fri, 20 Jan 2023 12:10:21 -0330	[thread overview]
Message-ID: <B49004E0-0B3D-4AFF-BEF1-CDDC2FDAC559@markwbutt.com> (raw)

Hi Everyone,

I have OpenBSD 7.2 installed and running on an AlphaServer 4100.  DEC Alpha EV5 processors.
No major issues with getting it running on this old hardware other than a slight bug one of the developers over at OpenBSD squashed for me.

I have been having great success with building modern tools and software on the system.  No problems at all.  Except for one…

A particular piece of software I am trying to build requires GCC 8.3.0 which is much newer than the version that comes with OpenBSD.  I am attempting to build and install GCC 8.3.0 in a separate location from the main system compiler as OpenBSD doesn’t usually take kindly to having its system compiler version changed. 

I have used the gcc-8.3.0 included script to download and extract the dependancies that GCC will need.  I have also downloaded, compiled and installed the latest version of binutils.  Installed to /usr/local

These are the configure and make commands I am using, and I am running this in a location NOT in the source tree.

bash-5.2# pwd
/u01/software/gcc/build-gcc-8.3.0

bash-5.2# ../gcc-8.3.0/configure CFLAGS="-I/usr/include -I/usr/local/include" LDFLAGS="-L/usr/lib -L/usr/local/lib" --disable-multilib --disable-cet --enable-language=c,c++ --prefix=/usr/local --disable-nls

bash-5.2# /usr/local/bin/make

Things appear to go well for quite a while (two 300Mhz processors), then the make dies with:

gcc -c -DHAVE_CONFIG_H -I/usr/include -I/usr/local/include  -I. -I../../../gcc-8.3.0/libiberty/../include  -W -Wall -Wwrite-strings -Wc++-compat -Wstr10:31:49 [22/1989]
dantic  -D_GNU_SOURCE ../../../gcc-8.3.0/libiberty/objalloc.c -o objalloc.o
../../../gcc-8.3.0/libiberty/objalloc.c: In function 'objalloc_create’:
../../../gcc-8.3.0/libiberty/objalloc.c:95: error: 'PTR' undeclared (first use in this function) 
../../../gcc-8.3.0/libiberty/objalloc.c:95: error: (Each undeclared identifier is reported only once 
../../../gcc-8.3.0/libiberty/objalloc.c:95: error: for each function it appears in.)
../../../gcc-8.3.0/libiberty/objalloc.c:95: error: expected ';' before ‘malloc'
../../../gcc-8.3.0/libiberty/objalloc.c: At top level: 
../../../gcc-8.3.0/libiberty/objalloc.c:115: error: expected '=', ',', ';', 'asm' or '__attribute__' before ‘_objalloc_alloc'
../../../gcc-8.3.0/libiberty/objalloc.c:198: error: expected declaration specifiers or '...' before ‘PTR'
../../../gcc-8.3.0/libiberty/objalloc.c:199: error: conflicting types for ‘objalloc_free_block'
../../../gcc-8.3.0/libiberty/../include/objalloc.h:113: error: previous declaration of 'objalloc_free_block' was here
../../../gcc-8.3.0/libiberty/objalloc.c: In function 'objalloc_free_block’:
../../../gcc-8.3.0/libiberty/objalloc.c:201: error: 'block' undeclared (first use in this function)
../../../gcc-8.3.0/libiberty/objalloc.c:260: error: 'PTR' undeclared (first use in this function)
../../../gcc-8.3.0/libiberty/objalloc.c:260: error: expected ';' before ‘first'
../../../gcc-8.3.0/libiberty/objalloc.c:290: error: expected ';' before ‘p'
make[3]: *** [Makefile:1041: objalloc.o] Error 1
make[3]: Leaving directory '/u01/software/gcc/build-gcc-8.3.0/build-alpha-unknown-openbsd7.2/libiberty'
make[2]: *** [Makefile:2645: all-build-libiberty] Error 2
make[2]: Leaving directory '/u01/software/gcc/build-gcc-8.3.0'
make[1]: *** [Makefile:26838: stage1-bubble] Error 2
make[1]: Leaving directory '/u01/software/gcc/build-gcc-8.3.0'
make: *** [Makefile:952: all] Error 2


I took a look at ../gcc-8.3.0/libiberty/objalloc.c  and it appears to be having issues with:
Line 95 referenced in the error above:  ret->chunks = (PTR) malloc (CHUNK_SIZE);

This could entirely be down to me going about this endeavour the wrong way.  I have been doing a lot of reading, and experimenting over the past two weeks… but not much luck getting past this.  I have tried the default shell for OpenBSD as well as the bash shell noted above incase there was something about the bash install I did… I have a personal preference towards bash :) 

If anyone sees this and has an “A-HA!” moment about what could be wrong, I would certainly appreciate any assistance you could offer.

Thanks all and enjoy the weekend!
-M
-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


             reply	other threads:[~2023-01-20 15:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-20 15:40 Mark Butt [this message]
2023-01-20 17:30 ` Jonathan Wakely
2023-01-22 17:37   ` Mark Butt
2023-01-22 18:36     ` Jonathan Wakely
2023-01-22 18:40     ` Jeff Law
2023-01-27 17:58       ` Segher Boessenkool
2023-01-27 19:21         ` Mark Butt
2023-01-27 19:25           ` Arsen Arsenović
2023-01-27 20:17           ` Jonathan Wakely
2023-01-27 21:14           ` Segher Boessenkool
2023-01-27 19:41 ` Christer Solskogen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B49004E0-0B3D-4AFF-BEF1-CDDC2FDAC559@markwbutt.com \
    --to=mark@markwbutt.com \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).