Opened 10 years ago
Closed 10 years ago
#43744 closed defect (worksforme)
library not found for -lgcc
Reported by: | kj299@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.2.1 |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt) | |
Port: | sqlite3 |
Description
After getting a new 10.9 machine and security patches, I've been unable to update several ports (e.g. sqlite3, py26-pyobjc @2.5.1_0, and so on)
Attachments (3)
Change History (19)
Changed 10 years ago by kj299@…
Attachment: | config.log added |
---|
comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
You got a new 10.9 machine, but did you migrate data from a machine running an earlier OS X version? And had you previously installed Xcode and/or MacPorts on that machine? If so you need to follow the migration instructions.
comment:2 Changed 10 years ago by kj299@…
I installed everything fresh to avoid any issues with migration of software.
comment:3 Changed 10 years ago by kj299@…
I will go through the reinstall process/migration instructions regardless and report back
comment:4 Changed 10 years ago by kj299@…
I'm still having similar issues as before. Not sure what is broken in my system
---log-snip--- abilist=64 x32 32 cclist=gcc icc cc configure:5546: /usr/bin/clang -c conftest.c >&5 configure:5549: $? = 0 configure:5552: checking whether /usr/bin/clang is gcc configure:5554: result: yes configure:5568: /usr/bin/clang 2>&1 | grep xlc >/dev/null configure:5571: $? = 1 configure:5625: checking compiler /usr/bin/clang -O2 -pedantic -fomit-frame-pointer -m64 -I/opt/local/include Test compile: configure:5639: /usr/bin/clang -O2 -pedantic -fomit-frame-pointer -m64 -I/opt/local/include conftest.c >&5 ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1/x86_64' following -L not found ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1/x86_64' following -L not found ld: warning: directory '/usr/lib/i686-apple-darwin13/4.2.1' following -L not found ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1' following -L not found ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1' following -L not found ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1/../../../i686-apple-darwin13/4.2.1' following -L not found ld: warning: directory '/usr/lib/gcc/i686-apple-darwin13/4.2.1/../../..' following -L not found ld: library not found for -lgcc configure:5642: $? = 1 failed program was: int main () { return 0; } configure:6665: result: no configure:6903: error: could not find a working compiler, see config.log for details ---log-snip---- host:~ username$ xcode-select -print-path /Applications/Xcode.app/Contents/Developer host:~ username$ gcc --version i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5646) (LLVM build 2207.5) Copyright (C) 2007 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
comment:5 Changed 10 years ago by kj299@…
i uninstalled xcode, rebooted
reinstalled xcode, rebooted
reinstalled macports, rebooted
installed the following ports
bzip2 @1.0.6_0 (active) curl @7.36.0_0+ssl (active) curl-ca-bundle @7.36.0_0 (active) e2fsprogs @1.42.9_0 (active) expat @2.1.0_0 (active) file @5.18_1 (active) gettext @0.18.3.2_0 (active) gmake @4.0_0 (active) gnutar @1.27.1_0 (active) libcomerr @1.42.9_0 (active) libedit @20121213-3.0_0 (active) libiconv @1.14_0 (active) libidn @1.26_0 (active) libmagic @5.18_1 (active) libpcap @1.5.3_0 (active) ncurses @5.9_2 (active) openssl @1.0.1g_0 (active) ossp-uuid @1.6.2_2+perl5_16 (active) readline @6.3.003_0 (active) sqlite3 @3.8.4.3_0 (active) tcp_wrappers @20_2 (active) tcpdump @4.5.1_0 (active) xz @5.0.5_0 (active) zlib @1.2.8_0 (active)
unable to get gawk, stunnel, and other ports to install
comment:6 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
On Mavericks, "gcc" should not be llvm-gcc; it should be clang. This suggests your Xcode and/or command line tools have not been updated for Mavericks, which is one of the migration steps. Please ensure you are running Xcode 5.1.1 or later (i.e. from the Mac App Store), and are running the corresponding version of the Xcode command line tools (which you install by running "xcode-select --install
").
comment:7 Changed 10 years ago by kj299@…
That is the case, but still having the same issue. Any other ideas? I've uninstalled and rebooted xcode and macports several times.
Thanks
$ xcode-select --install Usage: xcode-select -print-path or: xcode-select -switch <xcode_folder_path> or: xcode-select -version Arguments: -print-path Prints the path of the current Xcode folder -switch <xcode_folder_path> Sets the path for the current Xcode folder -version Prints xcode-select version information $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.2.0 Thread model: posix $ xcodebuild -version Xcode 5.1.1 Build version 5B1008
comment:8 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
We're at least making progress. (P.S: Don't forget to use WikiFormatting when writing in Trac.)
The sqlite3 config.log you originally attached showed you are running Mavericks:
uname -v = Darwin Kernel Version 13.1.0: Wed Apr 2 23:52:02 PDT 2014; root:xnu-2422.92.1~2/RELEASE_X86_64
But that the version of clang it was trying to use was old:
/usr/bin/clang --version >&5 clang version 1.0.2 (http://llvm.org/svn/llvm-project/cfe/tags/Apple/clang-32 exported)
Next, you showed that your gcc
symlink was pointing to an old version of llvm-gcc:
$ gcc --version i686-apple-darwin10-llvm-gcc-4.2 (GCC) 4.2.1 (Based on Apple Inc. build 5646) (LLVM build 2207.5)
Those versions of clang and llvm-gcc are the ones that were included with Xcode 3.2.2 on Mac OS X 10.6 Snow Leopard and are not appropriate for OS X 10.9 Mavericks. They were probably migrated from your previous system. This should have been fixed by reinstalling Xcode, which you said you subsequently did. After uninstalling and reinstalling Xcode, you showed that your xcodebuild
reports the correct Xcode version 5.1.1, and that your gcc
symlink now points to the correct version of clang. So that's good progress.
However, you also showed that your xcode-select
command does not recognize the --install
argument, which suggests your version of xcode-select
is not the one that belongs on Mavericks, and could mean that your Xcode command line tools are not up to date. I'm not sure what package provides xcode-select
; I think it used to be provided by Xcode on previous systems but on Mavericks it is provided by the operating system itself. So that's puzziling; the only way that your Mavericks xcode-select
should have been replaced by an older version is if you ran an older Xcode installer while on Mavericks.
Regardless of how the old xcode-select
got on your system, you need to get the Mavericks version of xcode-select
back onto your system. If it's not in your backups, you can use the one I'm attaching to this ticket (copy it into /usr/bin, owned by root:wheel, permissions 755). Then you should be able to run xcode-select --install
to update the Xcode command line tools.
The Xcode command line tools can also be downloaded from the Apple developer downloads (the package called "Command Line Tools (OS X Mavericks) for Xcode - April 2014"). I don't know if that would reinstall your xcode-select
program, though.
Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
Attachment: | xcode-select added |
---|
xcode-select from OS X 10.9 Mavericks
comment:9 Changed 10 years ago by kj299@…
Thanks for the file. I have the latest version of xcode-select, Xcode, and command line tools installed.
however, it appears that the build process can't find my "cc" compiler. any idea how i can change the PATH to ensure it is detected?
:debug:build Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.9' :debug:build Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10" && /usr/bin/make -j4 -w generic' :debug:build Executing command line: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10" && /usr/bin/make -j4 -w generic :info:build make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10' :info:build make -e nc -w --jobserver-fds=6,7 -j XFLAGS='-DGENERIC' STATIC= :info:build make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10' :info:build cc -O -s -DGENERIC -o nc netcat.c :info:build make[1]:cc: No such file or directory :info:build make[1]: *** [nc] Error 1 :info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10' :info:build make: *** [generic] Error 2 :info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10' :info:build Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_net_netcat/netcat/work/netcat-1.10" && /usr/bin/make -j4 -w generic :info:build Exit code: 2 :error:build org.macports.build for port netcat returned: command execution failed :debug:build Error code: CHILDSTATUS 11449 2 :debug:build Backtrace: command execution failed while executing "system -nice 0 $fullcmdstring" ("eval" body line 1) invoked from within "eval system $notty $nice \$fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname"
comment:10 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
You shouldn't need to change your PATH. Does /usr/bin/cc exist and work? If not, you'll need to fix that. It should have been provided by the Xcode command line tools.
Additionally, it is a bug that netcat attempts to use cc at all. I have filed #43808 about that.
comment:11 Changed 10 years ago by kj299@…
Yes Sir. Please see below
sh-3.2$ which cc ; cc --version /Library/Developer/CommandLineTools/usr/bin/cc Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) Target: x86_64-apple-darwin13.2.0 Thread model: posix
comment:12 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)
which cc
should return /usr/bin/cc
. Does /usr/bin/cc exist?
Why is /Library/Developer/CommandLineTools/usr/bin in your PATH?
comment:13 follow-up: 14 Changed 10 years ago by kj299@…
I placed it in my /etc/bashrc when i was troubleshooting this issue.
$ ls -l /usr/bin/cc lrwxr-xr-x 1 root wheel 22 May 18 12:40 /usr/bin/cc -> //usr/bin/llvm-gcc-4.2
i've attempted to reinstall command line tools from
xcode-select --install
when i'm prompted to download from server i receive the dialogue box "Can't install the software because it is not currently available from the Software Update Server"
i've installed the command line tools from the mpkg in the dmg i downloaded from Apple several times with reboots, but still no /usr/bin/cc
comment:14 Changed 10 years ago by neverpanic (Clemens Lang)
Replying to kj299@…:
$ ls -l /usr/bin/cc lrwxr-xr-x 1 root wheel 22 May 18 12:40 /usr/bin/cc -> //usr/bin/llvm-gcc-4.2
That's wrong. On my Mavericks system it is
lrwxr-xr-x 1 root wheel 5B Oct 23 2013 /usr/bin/cc -> clang
Did you manually modify /usr/bin/cc
?
"Can't install the software because it is not currently available from the Software Update Server"
That usually means the command line tools are installed and up-to-date. I agree the message could be better, but that's not in our hands.
comment:15 Changed 10 years ago by kj299@…
All - I kept running into new issues/errors leading me to believe the entire OS was jacked up. I ended up backing up my system and just wiping the entire OS. I reinstalled Mavericks and all of my software from scratch.
I no longer experience the issue. Thanks for your help
comment:16 Changed 10 years ago by neverpanic (Clemens Lang)
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Glad you found a solution.
config log