Opened 4 years ago

Closed 4 years ago

#61457 closed defect (worksforme)

libtool: configure error: C compiler cannot create executables

Reported by: rseichter (Ralph Seichter) Owned by: larryv (Lawrence Velázquez)
Priority: Normal Milestone:
Component: ports Version: 2.6.4
Keywords: Cc: ryandesign (Ryan Carsten Schmidt)
Port: libtool

Description

Still trying to get my fresh MacPorts 2.6.4 to compile its firs package. This time, the configure stage for libtool fails because "C compiler cannot create executables".

Attachments (2)

main.log (14.3 KB) - added by rseichter (Ralph Seichter) 4 years ago.
Main build log
config.log (12.2 KB) - added by rseichter (Ralph Seichter) 4 years ago.

Download all attachments as: .zip

Change History (12)

Changed 4 years ago by rseichter (Ralph Seichter)

Attachment: main.log added

Main build log

comment:1 Changed 4 years ago by rseichter (Ralph Seichter)

Owner: set to larryv
Status: newassigned

comment:2 Changed 4 years ago by rseichter (Ralph Seichter)

Possibly related, as far as problems of my new MacPorts installation are concerned: #61453

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

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

Cc: ryandesign added

Please attach the file /opt/local/var/macports/build/_opt_local_var_macports_sources_github.com_macports_macports-ports_devel_libtool/libtool/work/libtool-2.4.6/config.log so that we can see why this happened.

Changed 4 years ago by rseichter (Ralph Seichter)

Attachment: config.log added

comment:4 Changed 4 years ago by rseichter (Ralph Seichter)

config.log attached, thank you for investigating this issue.

comment:5 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Well it says the problem is:

configure:3902: checking whether the C compiler works
configure:3924: /usr/bin/clang -pipe -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch x86_64 -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk -arch x86_64 conftest.c  >&5
ld: library not found for -lSystem
clang: error: linker command failed with exit code 1 (use -v to see invocation)

which is of course a big problem. The System library is essential to everything. So why isn't it there, or why does it think it isn't there?

Are the .tbd files there in the SDK? Try running:

ls -l /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/lib/libSystem*

comment:6 Changed 4 years ago by rseichter (Ralph Seichter)

No match found for libSystem*:

% ls -l /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk/usr/lib/
total 64
-rw-r--r--  1 root  wheel  1228 17 Jul 12:20 libecpg.6.5.tbd
lrwxr-xr-x  1 root  wheel    15 29 Jul 03:00 libecpg.6.tbd -> libecpg.6.5.tbd
lrwxr-xr-x  1 root  wheel    15 29 Jul 03:00 libecpg.tbd -> libecpg.6.5.tbd
-rw-r--r--  1 root  wheel  1235 17 Jul 12:20 libecpg_compat.3.5.tbd
lrwxr-xr-x  1 root  wheel    22 29 Jul 03:00 libecpg_compat.3.tbd -> libecpg_compat.3.5.tbd
lrwxr-xr-x  1 root  wheel    22 29 Jul 03:00 libecpg_compat.tbd -> libecpg_compat.3.5.tbd
-rw-r--r--  1 root  wheel  2026 17 Jul 12:20 libpgtypes.3.4.tbd
lrwxr-xr-x  1 root  wheel    18 29 Jul 03:00 libpgtypes.3.tbd -> libpgtypes.3.4.tbd
lrwxr-xr-x  1 root  wheel    18 29 Jul 03:00 libpgtypes.tbd -> libpgtypes.3.4.tbd
-rw-r--r--  1 root  wheel  4122 17 Jul 12:20 libpq.5.6.tbd
lrwxr-xr-x  1 root  wheel    13 29 Jul 03:00 libpq.5.tbd -> libpq.5.6.tbd
lrwxr-xr-x  1 root  wheel    13 29 Jul 03:00 libpq.tbd -> libpq.5.6.tbd
-rw-r--r--  1 root  wheel   432 17 Jul 12:20 libviolet_nocatch.tbd
-rw-r--r--  1 root  wheel   583 17 Jul 12:20 libviolet_verifier.tbd
-rw-r--r--  1 root  wheel   679 17 Jul 12:20 libviolet_verifier_qemu.tbd

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

Then you should reinstall the Xcode 12.2 command line tools. There should be 304 things in that directory, and actually none of the things you showed should be in there, so there is something wrong with your SDK. Certainly the month of July is obviously wrong since the SDK was just released a couple days ago.

comment:8 Changed 4 years ago by rseichter (Ralph Seichter)

It took a while until the command line tools were reinstalled, and after that I had to execute a hard power-down to get my Mac to reboot, but now a couple of builds are in progress (like glib2 and icu). Quite odd. I distiinctly remember updating Xcode immediately before installing the Big Sur update.

Last edited 4 years ago by rseichter (Ralph Seichter) (previous) (diff)

comment:9 Changed 4 years ago by rseichter (Ralph Seichter)

The latest builds succeeded, so I suggest to consider this issue resolved.

comment:10 Changed 4 years ago by jmroot (Joshua Root)

Resolution: worksforme
Status: assignedclosed
Note: See TracTickets for help on using tickets.