C compiler cannot create executables during ./configure on MacOS 10.13

1,220 views
Skip to first unread message

tyler...@g.ucla.edu

unread,
Oct 26, 2017, 8:57:34 PM10/26/17
to OMNeT++ Users
Hello,
I am in the process of installing omnet in order to use veins on macOS 10.13. However, I had an issue when trying to run the veins tutorial (segfault in omnet), and decided to try reinstalling omnet. 

I removed the ~/omnet-5.2 directory and began from the start of the mac installation tutorial, located here https://omnetpp.org/doc/omnetpp/InstallGuide.pdf

However, now when I get to step 3.6 (./configure), I get the following output. This is surprising to me as I was able to build omnet just this last weekend. Any insight into this issue would be greatly appreciated:

checking build system type... x86_64-apple-darwin17.0.0

checking host system type... x86_64-apple-darwin17.0.0

configure: -----------------------------------------------

configure: reading configure.user for your custom settings

configure: -----------------------------------------------

checking for clang... clang

checking whether the C compiler works... no

configure: error: in `/Users/user/omnetpp-5.2':

configure: error: C compiler cannot create executables

See `config.log' for more details


This seems to be the relevant section of config.log:


configure:2345: checking for clang

configure:2361: found /usr/bin/clang

configure:2372: result: clang

configure:2403: checking for C compiler version

configure:2412: clang --version >&5

Apple LLVM version 9.0.0 (clang-900.0.38)

Target: x86_64-apple-darwin17.0.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

configure:2423: $? = 0

configure:2412: clang -v >&5

Apple LLVM version 9.0.0 (clang-900.0.38)

Target: x86_64-apple-darwin17.0.0

Thread model: posix

InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

configure:2423: $? = 0

configure:2412: clang -V >&5

clang: error: argument to '-V' is missing (expected 1 value)

clang: error: no input files

configure:2423: $? = 1

configure:2412: clang -qversion >&5

clang: error: unknown argument: '-qversion'

clang: error: no input files

configure:2423: $? = 1

configure:2443: checking whether the C compiler works

configure:2465: clang    conftest.c  >&5

ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.tbd, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.tbd (3 slices)

ld: dynamic main executables must link with libSystem.dylib for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

configure:2469: $? = 1

configure:2507: result: no

configure: failed program was:

| /* confdefs.h */

| #define PACKAGE_NAME ""

| #define PACKAGE_TARNAME ""

| #define PACKAGE_VERSION ""

| #define PACKAGE_STRING ""

| #define PACKAGE_BUGREPORT ""

| #define PACKAGE_URL ""

| /* end confdefs.h.  */

| int

| main ()

| {

|   ;

|   return 0;

| }

configure:2512: error: in `/Users/user/omnetpp-5.2':

configure:2514: error: C compiler cannot create executables

See `config.log' for more details


Running both clang and GCC manually seem to also generate the following error, which seems to be the heart of the issue:

ld: warning: URGENT: building for OSX, but linking in object file (/var/folders/zh/_w3j4fws2mb80tmb617r_ycr0000gn/T//ccfp3Evo.o) built for iOS. Note: This will be an error in the future.


If this issue is with clang, is there a way to force building to use GCC? Alternatively, any sort of insight into why clang is behaving this way would be great. I've looked online for insight into the error message clang seems to be throwing, but I haven't yet found anything definitive. Thank you for your help.



tyler...@g.ucla.edu

unread,
Oct 26, 2017, 8:58:36 PM10/26/17
to OMNeT++ Users
I wrote this up earlier, and then set around debugging before posting. Restarting Terminal resolved the issue for me. I believe the issue may have come from calling ".setenv" but I am not certain.

tyler...@g.ucla.edu

unread,
Oct 26, 2017, 8:59:26 PM10/26/17
to OMNeT++ Users
Another correction, the command was ". setenv", as specified in section 3.5 of the installation instructions.


On Thursday, October 26, 2017 at 5:57:34 PM UTC-7, tyler...@g.ucla.edu wrote:

Rudolf Hornig

unread,
Oct 27, 2017, 4:26:03 AM10/27/17
to OMNeT++ Users
It seems that the macOS SDK was not detected in the terminal and it was using the iPhone SDK: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.0.sdk/usr/lib/libSystem.tbd
Reply all
Reply to author
Forward
0 new messages