Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#65543 closed defect (fixed)

libgcc12 fails to build on Lion 10.7.5

Reported by: RobK88 Owned by: cjones051073 (Chris Jones)
Priority: Normal Milestone:
Component: ports Version: 2.7.2
Keywords: lion Cc: mascguy (Christopher Nielsen)
Port: libgcc12

Description (last modified by RobK88)

libgcc12 fails to build on lion.

Please see the attached log for details.

Attachments (2)

main.log.zip (1.7 MB) - added by RobK88 2 years ago.
main.log Zipped
macports.conf (8.2 KB) - added by RobK88 2 years ago.
macports.conf

Download all attachments as: .zip

Change History (14)

Changed 2 years ago by RobK88

Attachment: main.log.zip added

main.log Zipped

comment:1 Changed 2 years ago by RobK88

Description: modified (diff)

comment:2 Changed 2 years ago by mascguy (Christopher Nielsen)

Cc: mascguy added
Owner: set to cjones051073
Status: newassigned

comment:3 Changed 2 years ago by cjones051073 (Chris Jones)

builds fine in the build bots

https://ports.macports.org/port/libgcc12/details/

just curious, but as you are using the standard prefix and variants, why are you building from source at all, and not using the binary tarballs ?

comment:4 Changed 2 years ago by cjones051073 (Chris Jones)

From the log it doesn't look like an issue with the port itself, but for some reason the build was stopped..

:info:build ./libtool: line 1155: 41114 Killed: 9               /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/build/./gcc/xgcc -B/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/build/./gcc/ -B/opt/local/x86_64-apple-darwin11/bin/ -B/opt/local/x86_64-apple-darwin11/lib/ -isystem /opt/local/x86_64-apple-darwin11/include -isystem /opt/local/x86_64-apple-darwin11/sys-include -fchecking=1 -DHAVE_CONFIG_H -I. -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran -iquote/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/io -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/../gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/../gcc/config -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/../libquadmath -I../.././gcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/../libgcc -I../libgcc -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/../libbacktrace -I../libbacktrace -I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules -ffunction-sections -fdata-sections -g -O2 -pipe -Os -MT maxloc0_4_r17.lo -MD -MP -MF .deps/maxloc0_4_r17.Tpo -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc12/libgcc12/work/gcc-12.1.0/libgfortran/generated/maxloc0_4_r17.c -o maxloc0_4_r17.o > /dev/null 2>&1

for some reason that command was killed externally. no idea why that would happen for you.

Did you perhaps run out of resources, either memory or disk space ??

Can you please do a clean up and try again

sudo port clean libgcc12
sudo port -d sync
sudo port -v install libgcc12

comment:5 Changed 2 years ago by RobK88

Thanks. I will try again.

P.S. I do not know why Macports is not downloading the binary builds. "buildfromsource" is set to "ifneeded" in my macports.conf file. See attached. Any ideas why macports wants to build libgcc12 / gcc12 from source?

Last edited 2 years ago by RobK88 (previous) (diff)

Changed 2 years ago by RobK88

Attachment: macports.conf added

macports.conf

comment:6 Changed 2 years ago by RobK88

Second time is a charm. libgcc12 was built successfully this time on my old Mac Pro running Lion.

I still do not know why Macports still insists building this port from source. See my Macports.conf. If there is a way to get Macports to download and install the prebuilt binary builds for at least the compilers that would be great!

Last edited 2 years ago by RobK88 (previous) (diff)

comment:7 Changed 2 years ago by cjones051073 (Chris Jones)

Glad it now works.

Binary installs are the default, and work fine for the majority of people. The normal reasons why users build from source are

  1. Update is new and binary tarballs have not been created yet
  2. Non default install prefix
  3. Non default variants

None of the above seem to apply here.

Do you get binary installs for other ports, or are you building everything from source ?

comment:8 Changed 2 years ago by cjones051073 (Chris Jones)

Resolution: fixed
Status: assignedclosed

comment:9 in reply to:  7 Changed 2 years ago by RobK88

I agree. None of the exceptions apply to me.

Given my settings un macports.conf, Macports should be downloading and installing binary packages for the vast majority of the ports. But Macports wants to build from source every port. There must be a setting that I am missing.

comment:10 Changed 2 years ago by cjones051073 (Chris Jones)

All i can see from the log above is

debug:archivefetch archivefetch phase started at Tue Jul 26 09:40:14 EDT 2022
:debug:archivefetch Executing org.macports.archivefetch (libgcc12)
:debug:archivefetch Privilege de-escalation not attempted as not running as root.

normal proceedure so to run port instals via sudo. Are you not doing this ?

If you ant to follow up on this though I suggest moving this to the devel mailing list, as i am not really the expert here..

comment:11 Changed 2 years ago by RobK88

Thanks. I always use sudo with installing or upgrading ports. e.g. sudo port install libgcc12

I will do some more digging and will ask the dev mailing list, if need be.

comment:12 Changed 2 years ago by RobK88

FYI -- I now know why Macports wants to build all the ports from source on my Mac running Lion despite my setting in Macports buildfromsource ifneeded.

The problem lies with the following setting in my macports.conf which was recommended to be YES in previous versions of macports:

delete_la_files			yes

All ports will be built from source if this setting delete_la_files has a value other than the default value of No.

Below is the fix from the Macports wiki for Lion and Mtn Lion(https://trac.macports.org/wiki/LibcxxOnOlderSystems):

If you changed the delete_la_files setting from its default value (as suggested in much older versions of these instructions), you will
unfortunately need to uninstall all installed ports before changing it back, as ports built with this setting on are not compatible 
with those built with it off. All ports will be built from source if this setting has a value other than the default.

If I want to download prebuilt binaries, I will need to uninstall all my ports, change delete_la_files to no in macports.conf, and then reinstall my ports. That will be a lot of work. I might just stick with building everything from source!

P.S. To remind me, I have added the following to my macports.conf:

# IMPORTANT
#
# All ports will be built from source if delete_la_files has a value of yes.
# If you change delete_la_files from yes to no, you will need to uninstall all the ports
# and reinstall them because all ports built with this setting on are not compatible 
# with those built with it off.
Last edited 2 years ago by RobK88 (previous) (diff)
Note: See TracTickets for help on using tickets.