Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#41217 closed defect (invalid)

m4 @1.4.16: C compiler cannot create executables

Reported by: kc5tja@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: blair (Blair Zajac)
Port: m4

Description

After installing Mavericks (MacOS 10.9) on a MacBook Air, XCode 5.0.1, the command-line tools, and after attempting to install rvm as instructed on http://get.rvm.io/, I keep getting build errors. It seems that one or more packages required by rvm simply don't install under Mavericks at all. One such package is m4, which gives me the following errors:

$ sudo port install m4
Password:
--->  Configuring m4
Error: Failed to configure m4, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_m4/m4/work/m4-1.4.16/config.log
Error: org.macports.configure for port m4 returned: configure failure: command execution failed
Please see the log file for port m4 for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_m4/m4/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port m4 failed

When looking inside the specified log file, all I see is the following:

...etc...
:info:configure checking whether the C compiler works... no
:info:configure configure: error: in `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_m4/m4/work/m4-1.4.16':
:info:configure configure: error: C compiler cannot create executables
:info:configure See `config.log' for more details
:info:configure Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_m4/m4/work/m4-1.4.16" && ./configure --prefix=/opt/local --program-prefix=g ac_cv_libsigsegv=no
:info:configure Exit code: 77
...etc...

It seems that m4 will not compile with CLang-based compiler toolchains.

Does anyone know of a work-around for this problem? Thanks for your help.

Change History (6)

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: blair@… added
Keywords: m4 removed
Resolution: invalid
Status: newclosed
Summary: m4 @1.4.16 Configure error - build failurem4 @1.4.16: C compiler cannot create executables

m4 builds fine on Mavericks. You haven't installed the Xcode command line tools, which our documentation explains you must do. Run "xcode-select --install".

comment:2 Changed 11 years ago by kc5tja@…

Did you not see the text in my original problem description, where I stated in no uncertain terms, that I had already installed the command-line tools? How incredibly insulting.

Never mind. With support like this, I'm done with MacPorts completely.

Last edited 11 years ago by kc5tja@… (previous) (diff)

comment:3 Changed 11 years ago by blair (Blair Zajac)

People here are human and don't always read everything people write. Plus, you're getting free MacPorts support, so no need to get snotty.

In any case, there is something incorrect with the setup on the box, as shown by this line:

:info:configure checking whether the C compiler works... no

As far as I'm aware, this check is done in almost every configure script, so there's something not set up correctly with the Mac.

You should look at the config.log output since it'll print the exact command and what failed. With that, we'll be able to see what's going on.

comment:4 in reply to:  2 Changed 11 years ago by moilejter@…

Replying to kc5tja@…:

Did you not see the text in my original problem description, where I stated in no uncertain terms, that I had already installed the command-line tools? How incredibly insulting.

Never mind. With support like this, I'm done with MacPorts completely.

In case you had not seen this before, apparently there was a conflict with the location of the Tcl library - it seems to have moved in Mavericks... Rumor has it there is an installer for MacPorts-2.2.1 for Mavericks in particular that addresses this...

(I'm trying this myself, now...)

comment:5 Changed 11 years ago by anders+macports@…

I had the same problem. I looked at the config.log file, and found the problem. You have to "agree to the license agreement" the first time you run clang, and "sudo port" does not do that for you. Once I did that, I was able to compile with no errors. See below for details.

Relevant error in config.log:

configure:4245: /usr/bin/clang -pipe -Os -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c >&5

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

So, I just ran sudo clang… and…

$ sudo clang

You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.

Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

…yadda…yadda…yadda…

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree

comment:6 in reply to:  5 Changed 11 years ago by larryv (Lawrence Velázquez)

The usual way of agreeing is with xcodebuild --license.

Note: See TracTickets for help on using tickets.