Opened 4 years ago

Closed 4 years ago

#62368 closed defect (fixed)

macports.sqlext @2.6.3: error: C compiler cannot create executables

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.99
Keywords: Cc:
Port: macports.sqlext

Description

macports.sqlext configuration fails when configureccache yes is set in macports.conf:

checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking target system type... x86_64-apple-darwin17.7.0
checking MacPorts version... 2.6.3
checking for sw_vers... /usr/bin/sw_vers
checking for defaults... /usr/bin/defaults
checking for xcode-select... /usr/bin/xcode-select
checking macOS version... 10.13.6
checking Xcode location... /Library/Developer/CommandLineTools
checking whether the C compiler works... no
configure: error: in `/opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-ryandesign-fork_sysutils_macports.sqlext/macports.sqlext/work/MacPorts-2.6.3':
configure: error: C compiler cannot create executables
See `config.log' for more details
configure:2961: checking for C compiler version
configure:2970: ccache /usr/bin/clang --version >&5
./configure: line 2972: ccache: command not found
configure:2981: $? = 127
configure:2970: ccache /usr/bin/clang -v >&5
./configure: line 2972: ccache: command not found
configure:2981: $? = 127
configure:2970: ccache /usr/bin/clang -V >&5
./configure: line 2972: ccache: command not found
configure:2981: $? = 127
configure:2970: ccache /usr/bin/clang -qversion >&5
./configure: line 2972: ccache: command not found
configure:2981: $? = 127
configure:3001: checking whether the C compiler works
configure:3023: ccache /usr/bin/clang -pipe -Os -Werror=implicit-function-declaration -arch x86_64 -I/opt/local/include -L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64 conftest.c  >&5
./configure: line 3025: ccache: command not found
configure:3027: $? = 127
configure:3065: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "MacPorts"
| #define PACKAGE_TARNAME "macports"
| #define PACKAGE_VERSION "2.6.3"
| #define PACKAGE_STRING "MacPorts 2.6.3"
| #define PACKAGE_BUGREPORT "macports-dev@lists.macports.org"
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:3070: error: in `/opt/local/var/macports/build/_Users_rschmidt_macports_macports-ports-ryandesign-fork_sysutils_macports.sqlext/macports.sqlext/work/MacPorts-2.6.3':
configure:3072: error: C compiler cannot create executables

ccache is installed and works fine. macports.sqlext builds fine if I disable the use of ccache.

Looks like this is happening because configure.ac uses MP_PATH_SCAN from aclocal.m4 which is described as:

dnl This macro ensures MP installation prefix paths are NOT in PATH
dnl for configure to prevent potential problems when base/ code is updated
dnl and ports are installed that would match needed items.

This is desired when building MacPorts base outside of MacPorts but not really desired when building the sqlite extension within MacPorts.

We could punt and just prohibit the use of ccache (and distcc) in this portfile, or we could try to remove this PATH manipulation from the configure script.

Or since we're not building the sqlext as part of MacPorts anymore, we could move its code to an entirely separate repository/project.

Attachments (2)

config.log (8.5 KB) - added by ryandesign (Ryan Carsten Schmidt) 4 years ago.
main.log (7.7 KB) - added by ryandesign (Ryan Carsten Schmidt) 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: config.log added

Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

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

Owner: set to ryandesign
Resolution: fixed
Status: newclosed

In fe7a156cc1f1c352533a5f881e535314ad598814/macports-ports (master):

macports.sqlext: Fix build with ccache or distcc

Closes: #62368

Note: See TracTickets for help on using tickets.