Opened 3 years ago

Closed 3 years ago

#64708 closed defect (fixed)

python39 +lto+optimizations+universal: library member: libpython3.9.a(getbuildinfo.o) is not an object file (not allowed in a library with multiple architectures)

Reported by: metbic Owned by: jmroot (Joshua Root)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: yosemite Cc:
Port: python39, python310

Description

--->  Building python39
Error: Failed to build python39: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/main.log for details.
Error: rev-upgrade failed: Error rebuilding python39
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Attachments (5)

main p39.log (248.3 KB) - added by metbic 3 years ago.
main p39 2ndtry afterclean.log (215.5 KB) - added by metbic 3 years ago.
the log file of the second build attempt
config.log (907.9 KB) - added by metbic 3 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/work/Python-3.9.10/config.log
3rd try after cctools upgrade - main.log (310.7 KB) - added by metbic 3 years ago.
3rd try - config.log (907.9 KB) - added by metbic 3 years ago.
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/work/Python-3.9.10/config.log

Change History (21)

Changed 3 years ago by metbic

Attachment: main p39.log added

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

Owner: set to ryandesign
Status: newassigned

Please sudo port clean python39 and try again, now that you have fixed your llvm-7.0 libffi problem.

comment:2 Changed 3 years ago by metbic

Good morning.

I did and python39 still does not build. llvm built fine (libidn still won't build neither).

Error: Failed to build python39: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Changed 3 years ago by metbic

the log file of the second build attempt

Changed 3 years ago by metbic

Attachment: config.log added

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/work/Python-3.9.10/config.log

comment:3 Changed 3 years ago by evanmiller (Evan Miller)

This issue looks similar: https://github.com/pyenv/pyenv/issues/1267

Your configure file says: configure:6095: found /opt/local/bin/ar

So I would try:

port upgrade cctools

And if that doesn't work

port deactivate cctools

Then clean and rebuild python39.

comment:4 Changed 3 years ago by metbic

--->  Fetching archive for cctools
--->  Attempting to fetch cctools-949.0.1_1+llvm70.darwin_14.x86_64.tbz2 from http://packages.macports.org/cctools
--->  Attempting to fetch cctools-949.0.1_1+llvm70.darwin_14.x86_64.tbz2 from http://nue.de.packages.macports.org/cctools
--->  Attempting to fetch cctools-949.0.1_1+llvm70.darwin_14.x86_64.tbz2 from http://fra.de.packages.macports.org/cctools
--->  Fetching distfiles for cctools
--->  Verifying checksums for cctools
--->  Extracting cctools
--->  Applying patches to cctools
Warning: reinplace /^COMMON_SUBDIRS/s/ ld / / didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-949.0.1/Makefile
Warning: reinplace s:"llvm-mc":"llvm-mc-mp-7.0": didn't change anything in /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_cctools/cctools/work/cctools-949.0.1/as/driver.c
--->  Configuring cctools
--->  Building cctools
--->  Staging cctools into destroot                      
--->  Installing cctools @949.0.1_1+llvm70               
--->  Cleaning cctools
--->  Computing dependencies for cctools
--->  Deactivating cctools @949.0.1_0+llvm70
--->  Cleaning cctools
--->  Activating cctools @949.0.1_1+llvm70
--->  Cleaning cctools
--->  Computing dependencies for python39
--->  Fetching archive for python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://packages.macports.org/python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://nue.de.packages.macports.org/python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://fra.de.packages.macports.org/python39
--->  Building python39
Error: Failed to build python39: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

Upgrading cctools was only possible via port upgrade inkscape, trying to upgrade it via port upgrade cctools triggered the broken ports search and the rebuild wishlist, then, after hitting Y, the first port that gets rebuilt is python39 and that fails to build. Then, I did another clean python39 and upgrade python39, no results. Error logs of this 3rd try are attached.

Last edited 3 years ago by metbic (previous) (diff)

Changed 3 years ago by metbic

Changed 3 years ago by metbic

Attachment: 3rd try - config.log added

/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/work/Python-3.9.10/config.log

comment:5 Changed 3 years ago by metbic

sudo port deactivate cctools
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break:
 gcc9 @9.3.0_4
 gcc8 @8.4.0_2
 gcc10 @10.3.0_0
 clang-12 @12.0.1_0
Continue? [y/N]: y
Warning: Deactivate forced.  Proceeding despite dependencies.
--->  Deactivating cctools @949.0.1_1+llvm70
--->  Cleaning cctools
Mad-Cat ~> sudo port clean python39
--->  Cleaning python39
Mad-Cat ~> sudo port upgrade python39
--->  Computing dependencies for python39
--->  Fetching archive for python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://packages.macports.org/python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://nue.de.packages.macports.org/python39
--->  Attempting to fetch python39-3.9.10_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://fra.de.packages.macports.org/python39
--->  Fetching distfiles for python39
--->  Verifying checksums for python39
--->  Extracting python39
 --->  Applying patches to python39
--->  Configuring python39
--->  Building python39                                  
Error: Failed to build python39: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python39/python39/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

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

Owner: changed from ryandesign to jmroot
Summary: python39 won't buildpython39 +universal: library member: libpython3.9.a(getbuildinfo.o) is not an object file (not allowed in a library with multiple architectures)

At the moment it looks like this failure is specific to the +universal variant. I'll leave it to Josh to puzzle it out, though there are a couple other open tickets about problems with python universal variants already.

If you don't need python39 to have the universal variant, install it without that variant.

comment:7 Changed 3 years ago by metbic

I tried that and it seemed to work. I cleaned python39 and did a simple sudo port install python39 and it went through the build process successfully.

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

Port: python310 added

Duplicate #64719 says the problem affects python310 too.

comment:9 Changed 3 years ago by metbic

As stated above, the issue with python39 could be solved without the universal option. Is this maybe also feasible regarding python310? Is there a way to install python310 without universal? I'm not sure how the command syntax should be used to achieve that.

comment:10 Changed 3 years ago by metbic

I'm asking this since a simple install python310 is not enough to install it without universal option.

As before, I try to install it without universal.

After typing sudo port install python310, a broken port analysis is performed and recommends to rebuild glib2, and in order to do that, python310 is automatically installed with the universal option and this again fails.

Can I somehow instruct the automatic installer to do it without universal, maybe with a global no-universal system variable or anything?

Last edited 3 years ago by metbic (previous) (diff)

comment:11 Changed 3 years ago by jmroot (Joshua Root)

Summary: python39 +universal: library member: libpython3.9.a(getbuildinfo.o) is not an object file (not allowed in a library with multiple architectures)python39 +lto+optimizations+universal: library member: libpython3.9.a(getbuildinfo.o) is not an object file (not allowed in a library with multiple architectures)

Upgrading will only automatically add +universal if something else requires it. See port -v installed dependentof:python310 to help figure out what that is.

Can anyone test whether this also happens on other OS versions? And also whether -lto or -optimizations make any difference?

comment:12 Changed 3 years ago by metbic

 port -v installed dependentof:python310
The following ports are currently installed:
  asciidoc @9.0.4_0 requested_variants='' platform='darwin 14' archs='noarch' date='2021-01-19T12:05:06+0100'
  asciidoc @10.1.1_0 (active) requested_variants='' platform='darwin 14' archs='noarch' date='2022-02-21T18:58:36+0100'
  boost176 @1.76.0_3+no_single+no_static+python310 (active) requested_variants='' platform='darwin 14' archs='x86_64' date='2022-02-21T20:01:27+0100'
  ninja @1.10.2_0 requested_variants='' platform='darwin 14' archs='x86_64' date='2020-12-31T20:19:27+0100'
  ninja @1.10.2_4 (active) requested_variants='' platform='darwin 14' archs='x86_64' date='2022-02-21T18:01:46+0100'

The only one of those that has additional downstream dependants is ninja, meson depends on ninja. I will try now to disable all three dependants (asciidoc,boost176,ninja) and to install python310 then.

Last edited 3 years ago by metbic (previous) (diff)

comment:13 Changed 3 years ago by metbic

Still the same as in https://trac.macports.org/ticket/64708#comment:10, glib needs python310 with the automatic universal option and this breaks the process. I don't know if disabling glib2 is a good idea, since so many ports will break if I do this.

sudo port install python310
--->  Computing dependencies for python310
--->  Cleaning python310
--->  Scanning binaries for linking errors
--->  Found 45 broken files, matching files to ports     
Warning: No port p5.26-net-ssleay found in the index; can't rebuild
--->  Found 13 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 glib2 @2.58.3+universal+x11
 gobject-introspection @1.60.2+universal
 py27-gobject @2.28.7+x11
 py27-gobject3 @3.36.1
 py36-gobject3 @3.38.0
 py37-gobject3 @3.38.0
 py38-gobject3 @3.38.0
 py39-gobject3 @3.38.0
 gdl3 @3.40.0
 kdelibs4 @4.14.3
 neon @0.31.2
 gstreamer1-gst-plugins-bad @1.16.2+x11
 sane-backends @1.0.31+avahi
Continue? [Y/n]: y
--->  Computing dependencies for glib2
--->  Dependencies to be installed: ninja python310 re2c
--->  Fetching archive for python310
--->  Attempting to fetch python310-3.10.2_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://packages.macports.org/python310
--->  Attempting to fetch python310-3.10.2_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://fra.de.packages.macports.org/python310
--->  Attempting to fetch python310-3.10.2_0+lto+optimizations+universal.darwin_14.i386-x86_64.tbz2 from http://nue.de.packages.macports.org/python310
--->  Fetching distfiles for python310
--->  Verifying checksums for python310
--->  Extracting python310
--->  Applying patches to python310
--->  Configuring python310
--->  Building python310                                 
Error: Failed to build python310: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_python310/python310/main.log for details.
Error: rev-upgrade failed: Error rebuilding glib2
Error: Follow https://guide.macports.org/#project.tickets if you believe there is a bug.

I cleaned glib2 and installed it without universal, and now even more ports are broken (including wine-devel, and I must say, this starts to hurt now), while python310 still won't build.

Last edited 3 years ago by metbic (previous) (diff)

comment:14 Changed 3 years ago by jmroot (Joshua Root)

OK, wine-devel explains a lot, it's 32-bit and so all its dependencies have to be universal if your normal build arch is x86_64.

comment:15 in reply to:  14 Changed 3 years ago by metbic

Replying to jmroot:

OK, wine-devel explains a lot, it's 32-bit and so all its dependencies have to be universal if your normal build arch is x86_64.

Would you say the other trouble I'm experiencing https://trac.macports.org/ticket/64620 are universal-related too?

comment:16 Changed 3 years ago by jmroot (Joshua Root)

Resolution: fixed
Status: assignedclosed

In 063f7f7fb012ec6cf36f0ca1f69b8c285a62947f/macports-ports (master):

python39: don't add +lto to +universal on < 10.11

Fixes: #64708

Note: See TracTickets for help on using tickets.