Opened 2 years ago

Last modified 7 months ago

#65203 new defect

Failed to build gcc8: command execution failed

Reported by: manulcaux Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: Cc: cooljeanius (Eric Gallager)
Port: gcc8

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Hi,

I just installed the new Xcode 13.4 and the associated command-line tools and wanted to update my port installation.

After a successful port selfupdate, I ran sudo port upgrade outdated to upgrade all my packages and got this error :

(base) [macp2034:~/spectral-cube] caux% sudo port upgrade outdated
--->  Computing dependencies for gcc8
--->  Fetching archive for gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://packages.macports.org/gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://nue.de.packages.macports.org/gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://fra.de.packages.macports.org/gcc8
--->  Fetching distfiles for gcc8
--->  Verifying checksums for gcc8
--->  Extracting gcc8
--->  Applying patches to gcc8
--->  Configuring gcc8
Warning: Applying '--without-build-config' workaround to Xcode 13.4 / CLT 13.4.0.0.1.1651278267
Warning: If versions > 12.5 please check if it is still required
--->  Building gcc8                                      
Error: Failed to build gcc8: command execution failed    
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/main.log for details.
Error: Problem while installing gcc8
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.
(base) [macp2034:~/spectral-cube] caux% 

Checking the (very very) long file /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/main.log show the following at the end :

:info:build   line_maps *m_line_table;
:info:build              ^
:info:build 4 warnings and 8 errors generated.
:info:build make[3]: *** [charset.o] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build/build-x86_64-apple-darwin21/libcpp'
:info:build make[2]: *** [all-build-libcpp] Error 2
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:1341:8: warning: variable 'overflow' set but not used [-Wunused-but-set-variable]
:info:build   bool overflow = false;
:info:build        ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:1616:6: error: use of undeclared identifier 'free'
:info:build             free (tbuf.text);
:info:build             ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:1679:5: error: use of undeclared identifier 'free'
:info:build     free (tbuf.text);
:info:build     ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:1951:5: error: use of undeclared identifier 'free'
:info:build     free ((void *)str.text);
:info:build     ^
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:2050:7: error: use of undeclared identifier 'free'
:info:build       free (input);
:info:build       ^
:info:build In file included from /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/charset.c:22:
:info:build /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/gcc-8.5.0/libcpp/include/cpplib.h:789:14: warning: private field 'm_line_table' is not used [-Wunused-private-field]
:info:build   line_maps *m_line_table;
:info:build              ^
:info:build 4 warnings and 8 errors generated.
:info:build make[3]: *** [charset.o] Error 1
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build/libcpp'
:info:build make[2]: *** [all-stage1-libcpp] Error 2
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build'
:info:build make[1]: *** [stage1-bubble] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build'
:info:build make: *** [bootstrap-lean] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/work/build" && /usr/bin/make -j16 -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build gcc8: command execution failed
:debug:build Error code: CHILDSTATUS 30752 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$callback {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec -callback portprogress::target_progress_callback build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc8/gcc8/main.log for details.
(base) [macp2034:~/spectral-cube] caux%

I tried uninstalling gcc8, did a port clean gcc8 and ran again the port upgrade outdated command that ended with the same error...

Change History (8)

comment:1 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: failed to build removed

Remember to use WikiFormatting.

While this might be something we could fix, I see that you are on Monterey and are trying to use gcc8, which is old and predates Monterey and may not be suitable for use on Monterey. Do you specifically require this old version of gcc? If not, try the latest released version (gcc11) or the latest development version (gcc-devel).

comment:2 Changed 2 years ago by manulcaux

Hi, many thanks for helping. Indeed, I do not think I need gcc8, but all my attempts to remove it form my port installation didn't work, when I run sudo port upgrade outdated, it still try to install gcc8... Please let me know what should I do to be sure the upgrade outdated command does not try to install it. Cheers,

comment:3 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Then something you have installed depends on gcc8. Figure out what it is by running:

port installed depends:gcc8

For each port listed, if you don't need it, try to uninstall it. If you do need it, check if it perhaps offers variants for different gcc versions:

port variants putThePortNameHere

Install the port with a newer gcc variant:

sudo port install putThePortNameHere +gcc11

or perhaps the port is set up to pick the newest gcc variant if you don't pick one; if so, do that:

sudo port install putThePortNameHere

Another way to identify what is using gcc8:

sudo port uninstall gcc8

If ports you have installed depend on gcc8, MacPorts will prevent you from uninstalling it and tell you their names.

comment:4 Changed 2 years ago by manulcaux

Hi, Trying to do that does not solve my problem :

[macp2034:anaconda3/include/python3.9] caux% port installed depends:gcc8
None of the specified ports are installed.

It seems none of my ports depend on gcc8...

Then, I uninstalled gcc8 (I already tried that but it didn't work) :

[macp2034:anaconda3/include/python3.9] caux% sudo port uninstall gcc8

If I then try the following command :

[macp2034:anaconda3/include/python3.9] caux% port list gcc8
gcc8                           @8.5.0          lang/gcc8

Seems to indicate gcc8 is still present, and indeed if I run sudo port upgrade outdated

[macp2034:anaconda3/include/python3.9] caux% sudo port upgrade outdated
--->  Computing dependencies for gcc8
--->  Fetching archive for gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://packages.macports.org/gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://nue.de.packages.macports.org/gcc8
--->  Attempting to fetch gcc8-8.5.0_1.darwin_21.x86_64.tbz2 from https://fra.de.packages.macports.org/gcc8
--->  Building gcc8
Error: Failed to build gcc8: command execution failed    

I still have the same error.

Many thanks to help me to remove this gcc8 which I obviously do not need at all.

Cheers,

Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:5 Changed 2 years ago by manulcaux

Hi again,

I am wondering if the best for me would not be to completely remove my MacPort installation and start again with a fresh new one. MacPort is installed on my system in :

# MacPorts Installer addition on 2022-04-27_at_13:43:04: adding an appropriate PATH variable for use with MacPorts.
setenv PATH "/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.

In /opt, I have :

[macp2034:~] caux%   ls /opt
X11/   edm/   local/

And in /opt/local/ :

[macp2034:~] caux% ls /opt/local
Library/ bin/     etc/     include/ lib/     libexec/ man@     sbin/    share/   src/     var/     www/
[macp2034:~] caux% 

Would it be safe to completely remove the dire /opt/local and make a fresh install of MacPort ?

Many thanks to let me know, cheers

Last edited 2 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:6 Changed 2 years ago by manulcaux

Hi,

I am still stuck with this issue, please can someone give me some advice about removing the directory /opt/local and make a fresh install of MacPort ?

comment:7 in reply to:  6 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to manulcaux:

If I then try the following command :

[macp2034:anaconda3/include/python3.9] caux% port list gcc8
gcc8                           @8.5.0          lang/gcc8

Seems to indicate gcc8 is still present,

port list tells you what is in the ports tree. It does not tell you what is installed. See wiki:FAQ#portlist.

Replying to manulcaux:

I am still stuck with this issue, please can someone give me some advice about removing the directory /opt/local and make a fresh install of MacPort ?

If you wish to uninstall MacPorts, instructions are in the guide.

comment:8 Changed 7 months ago by cooljeanius (Eric Gallager)

Cc: cooljeanius added
Note: See TracTickets for help on using tickets.