Opened 7 years ago

Closed 7 years ago

#54327 closed defect (worksforme)

Error: Failed to build libgcc: command execution failed

Reported by: pedrotildes Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.4.1
Keywords: Cc:
Port: libgcc

Description

Hi There: I was trying to install Magicspp and the instalation fails when building libgcc

iMac-de-Pedro:dados pedrotildes$ sudo port install magicspp
Password:
--->  Computing dependencies for flex
--->  Fetching archive for flex
--->  Attempting to fetch flex-2.6.1_0.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/flex
--->  Attempting to fetch flex-2.6.1_0.darwin_16.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/flex
--->  Installing flex @2.6.1_0
--->  Cleaning flex
--->  Computing dependencies for flex
--->  Deactivating flex @2.6.0_0
--->  Cleaning flex
--->  Activating flex @2.6.1_0
--->  Cleaning flex
--->  Computing dependencies for swig
--->  Fetching archive for swig
--->  Attempting to fetch swig-3.0.12_0.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/swig
--->  Attempting to fetch swig-3.0.12_0.darwin_16.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/swig
--->  Installing swig @3.0.12_0
--->  Cleaning swig
--->  Computing dependencies for swig
--->  Deactivating swig @3.0.8_0
--->  Cleaning swig
--->  Activating swig @3.0.12_0
--->  Cleaning swig
--->  Computing dependencies for swig-python
--->  Fetching archive for swig-python
--->  Attempting to fetch swig-python-3.0.12_0.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/swig-python
--->  Attempting to fetch swig-python-3.0.12_0.darwin_16.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/swig-python
--->  Installing swig-python @3.0.12_0
--->  Cleaning swig-python
--->  Computing dependencies for swig-python
--->  Deactivating swig-python @3.0.8_0
--->  Cleaning swig-python
--->  Activating swig-python @3.0.12_0
--->  Cleaning swig-python
--->  Computing dependencies for boost
--->  Fetching archive for boost
--->  Attempting to fetch boost-1.59.0_3+no_single+no_static+python27.darwin_16.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/boost
--->  Attempting to fetch boost-1.59.0_3+no_single+no_static+python27.darwin_16.x86_64.tbz2.rmd160 from http://mse.uk.packages.macports.org/sites/packages.macports.org/boost
--->  Installing boost @1.59.0_3+no_single+no_static+python27
--->  Cleaning boost
--->  Computing dependencies for boost
--->  Deactivating boost @1.59.0_2+no_single+no_static+python27
--->  Cleaning boost
--->  Activating boost @1.59.0_3+no_single+no_static+python27
--->  Cleaning boost
--->  Computing dependencies for libgcc
--->  Building libgcc
Error: Failed to build libgcc: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/main.log for details.
Error: Unable to execute port: upgrade libgcc failed
iMac-de-Pedro:dados pedrotildes$ 

Is there a way to solve this? I'm attaching the log file. Thanks in advance

Attachments (1)

main.log.zip (499.2 KB) - added by pedrotildes 7 years ago.

Download all attachments as: .zip

Change History (20)

comment:1 Changed 7 years ago by Schamschula (Marius Schamschula)

Cc: takeshi@… removed
Keywords: MAGICS removed
Port: libgcc added; magicspp removed

Did you forget to upload the build log for libgcc?

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

The transcript shows an unclean build attempt. Clean libgcc and try again before attaching the main.log.

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

Duplicate #54330 has more info:

:info:build dyld: Library not loaded: /opt/local/lib/libxml2.2.dylib
:info:build   Referenced from: /opt/local/lib/libxar.1.dylib
:info:build   Reason: Incompatible library version: libxar.1.dylib requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0

Please clean and try again. If you still get the above, you'll have to explain why your libxml2 port is providing version 10 of its library when it should be providing version 12. You may need to reinstall the libxml2 port, at least.

comment:4 Changed 7 years ago by pedrotildes

Hi: I did clean libcc and then reinstall the libxml2 port. The result was the same: it fail during the building of libgcc. here's a transcript of end of the log file of the libgcc build.

:info:build collect2: fatal error: ld terminated with signal 6 [Abort trap: 6]
:info:build compilation terminated.
:info:build dyld: Library not loaded: /opt/local/lib/libxml2.2.dylib
:info:build   Referenced from: /opt/local/lib/libxar.1.dylib
:info:build   Reason: Incompatible library version: libxar.1.dylib requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
:info:build make[5]: *** [libgcc_s.dylib] Error 1
:info:build make[5]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/work/build/x86_64-apple-darwin16/i386/libgcc'
:info:build make[4]: *** [multi-do] Error 1
:info:build make[4]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/work/build/x86_64-apple-darwin16/libgcc'
:info:build make[3]: *** [all-multi] Error 2
:info:build make[3]: *** Waiting for unfinished jobs....
:info:build make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/work/build/x86_64-apple-darwin16/libgcc'
:info:build make[2]: *** [all-stage1-target-libgcc] 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_gcc6/libgcc/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_gcc6/libgcc/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_gcc6/libgcc/work/build'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/work/build" && /usr/bin/make -j4 -w bootstrap-lean 
:info:build Exit code: 2
:error:build Failed to build libgcc: command execution failed
:debug:build Error code: CHILDSTATUS 3132 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec 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_gcc6/libgcc/main.log for details.

comment:5 Changed 7 years ago by kencu (Ken)

Hi. It can be frustrating when things won't build. Usually we can help, but we need the entire log to do so. Please clean, try again, and upload the whole log for review if you like.

comment:6 Changed 7 years ago by pedrotildes

I did try to upload the log file but I got this message that the log file is to big!

comment:7 Changed 7 years ago by kencu (Ken)

Ah. Then use the Finder command to compress it first.

Changed 7 years ago by pedrotildes

Attachment: main.log.zip added

comment:8 Changed 7 years ago by pedrotildes

Ok...It's done!

comment:9 in reply to:  7 Changed 7 years ago by pedrotildes

Replying to kencu:

Ah. Then use the Finder command to compress it first.

Ok...It's done!

comment:10 Changed 7 years ago by Schamschula (Marius Schamschula)

What does port installed libxml2 say?

I get libxml2 @2.9.4_1 (active)

comment:11 in reply to:  10 Changed 7 years ago by pedrotildes

Replying to Schamschula:

What does port installed libxml2 say?

I get libxml2 @2.9.4_1 (active)

It says:

iMac-de-Pedro:~ pedrotildes$ port installed libxml2
The following ports are currently installed:
  libxml2 @2.9.2_2
  libxml2 @2.9.4_1 (active)
iMac-de-Pedro:~ pedrotildes$ 

comment:12 Changed 7 years ago by kencu (Ken)

Would you mind trying the following?

sudo port rev-upgrade

comment:13 Changed 7 years ago by kencu (Ken)

Here's the basic issue you seem to be having, which is not easy to understand. Your xar port is looking for a libxml of version 12 or greater, which you certainly should have. So something is amiss.

First of all, please make sure nothing has slipped in to /usr/local/* on you. There should be nothing in that subdirectory.

check your version of xar.

port -v installed xar

you should see something similar to this (with a different darwin version in your case)

The following ports are currently installed:
  xar @1.5.2_2+universal (active) platform='darwin 10' archs='i386 x86_64' date='2016-12-22T12:34:01-0800'

then check your version of libxml2

port -v installed libxml2

you should see

$ port -v installed libxml2
The following ports are currently installed:
  libxml2 @2.9.4_1+debug+universal (active) platform='darwin 10' archs='i386 x86_64' date='2017-05-21T13:13:52-0700'

if all those are in place, then check the linkages to see what is wrong

port -v contents xar
$ port -v contents xar
Port xar contains:
  /opt/local/bin/xar
  /opt/local/include/xar/xar.h
  /opt/local/lib/libxar.1.dylib
  /opt/local/lib/libxar.a
  /opt/local/lib/libxar.dylib
  /opt/local/share/man/man1/xar.1.gz

The library is libxar.1.dylib, so then check that

$ otool -L /opt/local/lib/libxar.1.dylib
/opt/local/lib/libxar.1.dylib:
	/opt/local/lib/libxar.1.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libbz2.1.0.dylib (compatibility version 1.0.0, current version 1.0.6)
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.8)
	/opt/local/lib/libcrypto.1.0.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libxml2.2.dylib (compatibility version 12.0.0, current version 12.4.0)
	/opt/local/lib/liblzma.5.dylib (compatibility version 8.0.0, current version 8.2.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)
	/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.1.0)

notice my libxar.1.dylib is linking into libxml2.2.dylib which has compatability version 12.0.0, which is what is needed.

Do you see anything different in your installation?

comment:14 Changed 7 years ago by pedrotildes

Yes I see some things quiet different. Here's the code:

iMac-de-Pedro:~ pedrotildes$ sudo port rev-upgrade
Password:
--->  Scanning binaries for linking errors
--->  Found 103 broken files, matching files to ports    
--->  Found 23 broken ports, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt:
 pkgconfig @0.29.2
 gettext @0.19.8.1+universal
 python27 @2.7.13+universal
 py27-libxml2 @2.9.4
 xar @1.5.2
 libxslt @1.1.29
 boost @1.59.0+no_single+no_static+python27
 netcdf @4.4.1+dap+netcdf4
 p5.24-xml-parser @2.440.0
 py27-matplotlib @1.5.1+cairo
 gcc47 @4.7.4
 gcc49 @4.9.3
 gcc5 @5.3.0
 fontconfig @2.12.3
 ghostscript @9.21+x11
 glib2 @2.50.3
 shared-mime-info @1.7
 libcroco @0.6.12
 librsvg @2.40.16
 xz @5.2.3+universal
 libarchive @3.3.1
 cmake @3.8.2
 GraphicsMagick @1.3.25+q8
Continue? [Y/n]: y
--->  Computing dependencies for pkgconfig
--->  Cleaning pkgconfig
--->  Computing dependencies for gettext
--->  Cleaning gettext
--->  Computing dependencies for python27
--->  Cleaning python27
--->  Computing dependencies for py27-libxml2
--->  Cleaning py27-libxml2
--->  Computing dependencies for xar
--->  Cleaning xar
--->  Computing dependencies for libxslt
--->  Cleaning libxslt
--->  Computing dependencies for boost
--->  Cleaning boost
--->  Computing dependencies for netcdf
--->  Cleaning netcdf
--->  Computing dependencies for p5.24-xml-parser
--->  Cleaning p5.24-xml-parser
--->  Computing dependencies for libgcc
--->  Building libgcc
Error: Failed to build libgcc: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc6/libgcc/main.log for details.
Error: rev-upgrade failed: Error rebuilding py27-matplotlib
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
iMac-de-Pedro:~ pedrotildes$ port -v installed xar
The following ports are currently installed:
  xar @1.5.2_2 (active) platform='darwin 16' archs='x86_64' date='2017-06-11T17:35:05+0100'
iMac-de-Pedro:~ pedrotildes$ port -v installed libxml2
The following ports are currently installed:
  libxml2 @2.9.2_2 platform='darwin 15' archs='x86_64' date='2016-01-10T16:09:07+0000'
  libxml2 @2.9.4_1 (active) platform='darwin 16' archs='x86_64' date='2017-06-11T17:34:45+0100'
iMac-de-Pedro:~ pedrotildes$ port -v contents xar
Port xar contains:
  /opt/local/bin/xar
  /opt/local/include/xar/xar.h
  /opt/local/lib/libxar.1.dylib
  /opt/local/lib/libxar.a
  /opt/local/lib/libxar.dylib
  /opt/local/share/man/man1/xar.1.gz
iMac-de-Pedro:~ pedrotildes$ otool -L /opt/local/lib/libxar.1.dylib
dyld: Library not loaded: /opt/local/lib/libxml2.2.dylib
  Referenced from: /opt/local/lib/libxar.1.dylib
  Reason: Incompatible library version: libxar.1.dylib requires version 12.0.0 or later, but libxml2.2.dylib provides version 10.0.0
fatal error: otool: fatal error in /opt/local/bin/llvm-objdump-mp-3.9

Thanks again for your attention!! Pedro

comment:15 Changed 7 years ago by ryandesign (Ryan Carsten Schmidt)

As I said above, you need to rebuild libxml2, at least. The command to do so would be:

sudo port -n upgrade --force libxml2

comment:16 Changed 7 years ago by kencu (Ken)

Ugly looking situation. If Ryan's suggestion doesn't work, I might just consider starting completely over if I were you.

Oh - now that I look closer, you have stuff in there from a previous version of macOS (platform darwin 15). That's a serious no-no.

I'd make a list of all your ports port -v installed > installed_ports.txt, completely remove all of macports (there are instructions on the website) and reinstall from scratch.

As Ripley says, "Nuke the site from orbit - it's the only way to be sure."

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:17 in reply to:  16 Changed 7 years ago by pedrotildes

Replying to kencu:

Ugly looking situation. If Ryan's suggestion doesn't work, I might just consider starting completely over if I were you.

Oh - now that I look closer, you have stuff in there from a previous version of macOS (platform darwin 15). That's a serious no-no.

I'd make a list of all your ports port -v installed > installed_ports.txt, completely remove all of macports (there are instructions on the website) and reinstall from scratch.

As Ripley says, "Nuke the site from orbit - it's the only way to be sure."

Ok... Thanks for the suggestion!

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

Replying to kencu:

Oh - now that I look closer, you have stuff in there from a previous version of macOS (platform darwin 15). That's a serious no-no.

Well the one shown wasn't active so it isn't doing anything harmful.

The user should of course follow wiki:Migration when upgrading the OS.

comment:19 Changed 7 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

There is nothing to fix here. It builds on the buildbot.

Note: See TracTickets for help on using tickets.