Opened 3 years ago

Closed 3 years ago

#61906 closed defect (duplicate)

gcc48: error: non-local symbol required in directive

Reported by: dbl001 (dbl) Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc:
Port: gcc48

Description

Error building gcc48 from: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/gcc48/main.log

:info:build /Library/Developer/CommandLineTools/usr/bin/make  all-am
:info:build <stdin>:69:17: error: non-local symbol required in directive
:info:build         .no_dead_strip L_OBJC_Module
:info:build                        ^
:info:build make[2]: *** [NXConstStr.lo] Error 1

Change History (16)

comment:1 Changed 3 years ago by kencu (Ken)

gcc48 can't build if the assembly is being set to clang to build.

newer gcc versions were patched upstream to fix this, but not gcc48.

To fix many broken builds of other ports, we altered cctools to send the assembly to clang if clang-5.0 or greater is installed.

So the short answer is deactivate clangs >= 5.0, do your gcc48 build, and then reactivate them, and you should be OK.

comment:2 Changed 3 years ago by dbl001 (dbl)

$ port select --list clang
Available versions for clang:
	mp-clang-5.0
	mp-clang-9.0
	none (active)
(ai) MacBook-Pro:~ davidlaxer$ sudo port deactivate mp-clang-5.0
Error: port deactivate failed: Image error: port mp-clang-5.0 is not active.
(ai) MacBook-Pro:~ davidlaxer$ sudo port deactivate mp-clang-9.0
Error: port deactivate failed: Image error: port mp-clang-9.0 is not active.

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

what os version are you on? I thought it was one of the older os versions.

See also #61398 #60087 #56996

comment:4 Changed 3 years ago by kencu (Ken)

if your system is 10.7+ then cctools will send the asm to the system clang.

comment:5 Changed 3 years ago by dbl001 (dbl)

I'm on 10.11.6.

comment:6 Changed 3 years ago by mf2k (Frank Schima)

Keywords: gcc48 removed

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

Summary: :info:build <stdin>:69:17: error: non-local symbol required in directive :info:build .no_dead_strip L_OBJC_Modulegcc48: error: non-local symbol required in directive

comment:8 Changed 3 years ago by kencu (Ken)

can you go with gcc-5+ then?

If not, and you have to have gcc48, I put some patches in #56996

comment:9 Changed 3 years ago by dbl001 (dbl)

Yes. But when I tried to uninstall gcc48, noting happened.

$ sudo port install gcc5
Password:
--->  Computing dependencies for gcc5
--->  Fetching archive for gcc5
--->  Attempting to fetch gcc5-5.5.0_6.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gcc5
--->  Attempting to fetch gcc5-5.5.0_6.darwin_15.x86_64.tbz2.rmd160 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gcc5
--->  Installing gcc5 @5.5.0_6
--->  Activating gcc5 @5.5.0_6
--->  Cleaning gcc5
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
(lda2vec) MacBook-Pro:~ davidlaxer$ sudo port uninstall gcc48
(lda2vec) MacBook-Pro:~ davidlaxer$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.6.4 installed,
MacPorts base version 2.6.4 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
(lda2vec) MacBook-Pro:~ davidlaxer$ sudo port upgrade outdated
--->  Computing dependencies for gcc48
--->  Fetching archive for gcc48
--->  Attempting to fetch gcc48-4.8.5_6.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/gcc48
--->  Attempting to fetch gcc48-4.8.5_6.darwin_15.x86_64.tbz2 from https://kmq.jp.packages.macports.org/gcc48
--->  Attempting to fetch gcc48-4.8.5_6.darwin_15.x86_64.tbz2 from https://lil.fr.packages.macports.org/gcc48
--->  Building gcc48
Error: Failed to build gcc48: command execution failed
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_lang_gcc48/gcc48/main.log for details.
Error: Problem while installing gcc48
Error: Follow https://guide.macports.org/#project.tickets to report a bug.

comment:10 Changed 3 years ago by dbl001 (dbl)

$ sudo port uninstall -v gcc48
Password:
$ sudo port uninstall -d gcc48
$

comment:11 Changed 3 years ago by kencu (Ken)

yeah, so that is a bit weird.

what exactly do you have installed in the way of gcc?

port -v installed | grep gcc

where is it?

port file gcc48

comment:12 Changed 3 years ago by dbl001 (dbl)

$ port -v installed | grep gcc
  gcc5 @5.5.0_6 (active) platform='darwin 15' archs='x86_64' date='2020-12-24T08:53:40-0800'
  gcc9 @9.3.0_3 platform='darwin 15' archs='x86_64' date='2020-11-01T05:38:24-0800'
  gcc9 @9.3.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:38:21-0800'
  gcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-01T05:40:05-0800'
  gcc10 @10.2.0_3 platform='darwin 15' archs='x86_64' date='2020-11-17T10:26:25-0800'
  gcc10 @10.2.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:40:14-0800'
  gcc_select @0.1_8 platform='darwin 15' archs='noarch' date='2020-04-25T08:18:19-0700'
  gcc_select @0.1_9 (active) platform='darwin 15' archs='noarch' date='2020-11-01T12:42:14-0800'
  julia @1.5.2_0+gcc10 platform='darwin 15' archs='x86_64' date='2020-09-30T02:14:34-0700'
  julia @1.5.3_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-11-24T10:28:21-0800'
  libgcc @3.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-05-04T08:43:04-0700'
  libgcc6 @6.5.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:33-0700'
  libgcc7 @7.5.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:31-0700'
  libgcc8 @8.4.0_1 (active) platform='darwin 15' archs='x86_64' date='2020-09-02T09:49:32-0700'
  libgcc9 @9.3.0_2 platform='darwin 15' archs='x86_64' date='2020-09-02T09:44:42-0700'
  libgcc9 @9.3.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:34-0800'
  libgcc10 @10.2.0_1 platform='darwin 15' archs='x86_64' date='2020-09-01T10:33:06-0700'
  libgcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-17T10:25:39-0800'
  libgcc10 @10.2.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:30-0800'
  mpich-default @3.3.2_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T15:51:27-0700'
  OpenBLAS @0.3.12_0+gcc48+lapack (active) platform='darwin 15' archs='x86_64' date='2020-10-28T03:31:44-0700'
  openmpi-default @4.0.1_1+gcc9 (active) platform='darwin 15' archs='x86_64' date='2020-04-28T13:08:22-0700'
  qrupdate @1.1.2_6+accelerate+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T13:44:30-0700'
$ port file gcc48
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc48/Portfile
$ 

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

It's your OpenBLAS +gcc48 , some ancient variant that just kept getting updated I guess.

You also have openmpi-default as +gcc9, and other things as +gcc10.

So I would uninstall everything that is not +gcc10, and then reinstall them with default variants (that should be gcc10) or make them +gcc10 if they don't default that way.

Remove all your gcc versions prior to gcc10, remove all your libgcc versions prior to libgcc10, uninstall everything that depends on any gcc before gcc10, and then reinstall them with gcc10 variants.

That should keep you in business for a few years, until you need to do this again.

This is kinda MacPorts' fault, as forcing to a specific gcc version basically guarantees this will happen to people over time. We should force to a generic "gcc" that represents the latest gcc instead....

Another project for a compsci grad student with nothing to do :>

comment:14 Changed 3 years ago by dbl001 (dbl)

Comments:

$ sudo port uninstall openblas
Password:
--->  Deactivating OpenBLAS @0.3.12_0+gcc48+lapack
--->  Cleaning OpenBLAS
--->  Uninstalling OpenBLAS @0.3.12_0+gcc48+lapack
--->  Cleaning OpenBLAS
$ sudo port uninstall gcc48
$ sudo port install openblas
--->  Computing dependencies for OpenBLAS
--->  Fetching archive for OpenBLAS
--->  Attempting to fetch OpenBLAS-0.3.13_0+gcc10+lapack.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/OpenBLAS
--->  Attempting to fetch OpenBLAS-0.3.13_0+gcc10+lapack.darwin_15.x86_64.tbz2.rmd160 from https://ywg.ca.packages.macports.org/mirror/macports/packages/OpenBLAS
--->  Installing OpenBLAS @0.3.13_0+gcc10+lapack
--->  Activating OpenBLAS @0.3.13_0+gcc10+lapack
--->  Cleaning OpenBLAS
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  OpenBLAS has the following notes:
    This version is built based on a base architecture for convenience, 
    which may not be optimized for your system. To build a version 
    customized for your machine, use the +native variant
$ port -v installed | grep gcc
  gcc5 @5.5.0_6 (active) platform='darwin 15' archs='x86_64' date='2020-12-24T08:53:40-0800'
  gcc9 @9.3.0_3 platform='darwin 15' archs='x86_64' date='2020-11-01T05:38:24-0800'
  gcc9 @9.3.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:38:21-0800'
  gcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-01T05:40:05-0800'
  gcc10 @10.2.0_3 platform='darwin 15' archs='x86_64' date='2020-11-17T10:26:25-0800'
  gcc10 @10.2.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:40:14-0800'
  gcc_select @0.1_8 platform='darwin 15' archs='noarch' date='2020-04-25T08:18:19-0700'
  gcc_select @0.1_9 (active) platform='darwin 15' archs='noarch' date='2020-11-01T12:42:14-0800'
  julia @1.5.2_0+gcc10 platform='darwin 15' archs='x86_64' date='2020-09-30T02:14:34-0700'
  julia @1.5.3_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-11-24T10:28:21-0800'
  libgcc @3.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-05-04T08:43:04-0700'
  libgcc6 @6.5.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:33-0700'
  libgcc7 @7.5.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:31-0700'
  libgcc8 @8.4.0_1 (active) platform='darwin 15' archs='x86_64' date='2020-09-02T09:49:32-0700'
  libgcc9 @9.3.0_2 platform='darwin 15' archs='x86_64' date='2020-09-02T09:44:42-0700'
  libgcc9 @9.3.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:34-0800'
  libgcc10 @10.2.0_1 platform='darwin 15' archs='x86_64' date='2020-09-01T10:33:06-0700'
  libgcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-17T10:25:39-0800'
  libgcc10 @10.2.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:30-0800'
  mpich-default @3.3.2_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T15:51:27-0700'
  OpenBLAS @0.3.13_0+gcc10+lapack (active) platform='darwin 15' archs='x86_64' date='2020-12-24T11:59:16-0800'
  openmpi-default @4.0.1_1+gcc9 (active) platform='darwin 15' archs='x86_64' date='2020-04-28T13:08:22-0700'
  qrupdate @1.1.2_6+accelerate+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T13:44:30-0700'
$ sudo port selfupdate
--->  Updating MacPorts base sources using rsync
MacPorts base version 2.6.4 installed,
MacPorts base version 2.6.4 downloaded.
--->  Updating the ports tree
--->  MacPorts base is already the latest version

The ports tree has been updated. To upgrade your installed ports, you should run
  port upgrade outdated
$ sudo port upgrade outdated
--->  Computing dependencies for zstd
--->  Fetching archive for zstd
--->  Attempting to fetch zstd-1.4.8_0.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/zstd
--->  Attempting to fetch zstd-1.4.8_0.darwin_15.x86_64.tbz2 from https://kmq.jp.packages.macports.org/zstd
--->  Attempting to fetch zstd-1.4.8_0.darwin_15.x86_64.tbz2.rmd160 from https://kmq.jp.packages.macports.org/zstd
--->  Installing zstd @1.4.8_0
--->  Cleaning zstd
--->  Computing dependencies for zstd
--->  Deactivating zstd @1.4.7_0
--->  Cleaning zstd
--->  Activating zstd @1.4.8_0
--->  Cleaning zstd
--->  Computing dependencies for python38
--->  Fetching archive for python38
--->  Attempting to fetch python38-3.8.7_0+universal.darwin_15.i386-x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/python38
--->  Attempting to fetch python38-3.8.7_0+universal.darwin_15.i386-x86_64.tbz2 from https://kmq.jp.packages.macports.org/python38
--->  Attempting to fetch python38-3.8.7_0+universal.darwin_15.i386-x86_64.tbz2 from https://lil.fr.packages.macports.org/python38
--->  Fetching distfiles for python38
--->  Attempting to fetch Python-3.8.7.tar.xz from https://www.python.org/ftp/python/3.8.7/
--->  Verifying checksums for python38                                          
--->  Extracting python38
--->  Applying patches to python38
--->  Configuring python38
--->  Building python38
--->  Staging python38 into destroot
--->  Installing python38 @3.8.7_0+universal
--->  Cleaning python38
--->  Computing dependencies for python38
--->  Deactivating python38 @3.8.6_0+universal
--->  Cleaning python38
--->  Activating python38 @3.8.7_0+universal
--->  Cleaning python38
--->  Computing dependencies for opencv
--->  Fetching archive for opencv
--->  Attempting to fetch opencv-3.4.13_0.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/opencv
--->  Attempting to fetch opencv-3.4.13_0.darwin_15.x86_64.tbz2.rmd160 from https://ywg.ca.packages.macports.org/mirror/macports/packages/opencv
--->  Installing opencv @3.4.13_0
--->  Cleaning opencv
--->  Computing dependencies for opencv
--->  Deactivating opencv @3.4.12_0
--->  Cleaning opencv
--->  Activating opencv @3.4.13_0
--->  Cleaning opencv
--->  Computing dependencies for pcre2
--->  Fetching archive for pcre2
--->  Attempting to fetch pcre2-10.36_0.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/pcre2
--->  Attempting to fetch pcre2-10.36_0.darwin_15.x86_64.tbz2.rmd160 from https://ywg.ca.packages.macports.org/mirror/macports/packages/pcre2
--->  Installing pcre2 @10.36_0
--->  Cleaning pcre2
--->  Computing dependencies for pcre2
--->  Deactivating pcre2 @10.35_0
--->  Cleaning pcre2
--->  Activating pcre2 @10.36_0
--->  Cleaning pcre2
--->  Fetching archive for tcl
--->  Attempting to fetch tcl-8.6.10_1+corefoundation+threads.darwin_15.x86_64.tbz2 from https://ywg.ca.packages.macports.org/mirror/macports/packages/tcl
--->  Attempting to fetch tcl-8.6.10_1+corefoundation+threads.darwin_15.x86_64.tbz2.rmd160 from https://ywg.ca.packages.macports.org/mirror/macports/packages/tcl
--->  Installing tcl @8.6.10_1+corefoundation+threads
--->  Cleaning tcl
--->  Deactivating tcl @8.6.10_0+corefoundation+threads
--->  Cleaning tcl
--->  Activating tcl @8.6.10_1+corefoundation+threads
--->  Cleaning tcl
--->  Updating database of binaries
--->  Scanning binaries for linking errors
--->  No broken files found.                             
--->  No broken ports found.
--->  Some of the ports you installed have notes:
  python38 has the following notes:
    To make this the default Python or Python 3 (i.e., the version run by the
    'python' or 'python3' commands), run one or both of:
    
        sudo port select --set python python38
        sudo port select --set python3 python38
  tcl has the following notes:
    The Sqlite3 Tcl package is now being provided by the sqlite3-tcl port:
    sudo port install sqlite3-tcl
$ port -v installed | grep gcc
  gcc5 @5.5.0_6 (active) platform='darwin 15' archs='x86_64' date='2020-12-24T08:53:40-0800'
  gcc9 @9.3.0_3 platform='darwin 15' archs='x86_64' date='2020-11-01T05:38:24-0800'
  gcc9 @9.3.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:38:21-0800'
  gcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-01T05:40:05-0800'
  gcc10 @10.2.0_3 platform='darwin 15' archs='x86_64' date='2020-11-17T10:26:25-0800'
  gcc10 @10.2.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:40:14-0800'
  gcc_select @0.1_8 platform='darwin 15' archs='noarch' date='2020-04-25T08:18:19-0700'
  gcc_select @0.1_9 (active) platform='darwin 15' archs='noarch' date='2020-11-01T12:42:14-0800'
  julia @1.5.2_0+gcc10 platform='darwin 15' archs='x86_64' date='2020-09-30T02:14:34-0700'
  julia @1.5.3_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-11-24T10:28:21-0800'
  libgcc @3.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-05-04T08:43:04-0700'
  libgcc6 @6.5.0_4 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:33-0700'
  libgcc7 @7.5.0_0 (active) platform='darwin 15' archs='x86_64' date='2020-04-25T08:18:31-0700'
  libgcc8 @8.4.0_1 (active) platform='darwin 15' archs='x86_64' date='2020-09-02T09:49:32-0700'
  libgcc9 @9.3.0_2 platform='darwin 15' archs='x86_64' date='2020-09-02T09:44:42-0700'
  libgcc9 @9.3.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:34-0800'
  libgcc10 @10.2.0_1 platform='darwin 15' archs='x86_64' date='2020-09-01T10:33:06-0700'
  libgcc10 @10.2.0_2 platform='darwin 15' archs='x86_64' date='2020-11-17T10:25:39-0800'
  libgcc10 @10.2.0_3 (active) platform='darwin 15' archs='x86_64' date='2020-11-20T08:37:30-0800'
  mpich-default @3.3.2_0+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T15:51:27-0700'
  OpenBLAS @0.3.13_0+gcc10+lapack (active) platform='darwin 15' archs='x86_64' date='2020-12-24T11:59:16-0800'
  openmpi-default @4.0.1_1+gcc9 (active) platform='darwin 15' archs='x86_64' date='2020-04-28T13:08:22-0700'
  qrupdate @1.1.2_6+accelerate+gcc10 (active) platform='darwin 15' archs='x86_64' date='2020-05-15T13:44:30-0700'
(base) MacBook-Pro:~ davidlaxer$ port file gcc48
/opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/lang/gcc48/Portfile
$ 

Last edited 3 years ago by dbl001 (dbl) (previous) (diff)

comment:15 Changed 3 years ago by kencu (Ken)

You're in business at least.

I would still do the rest of what I suggested, getting rid of everything < gcc10/libgcc10, but that can be done any time.

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

Resolution: duplicate
Status: newclosed
Note: See TracTickets for help on using tickets.