osx - How do I pass a configure option to macports?
2014-04
I am following directions to install JavaHL bindings for Subversion from: http://subclipse.tigris.org/wiki/JavaHL
It says to run sudo port install subversion-javahlbindings +no_bdb +universal
when I do that I get an error
:info:configure configure: error: Cannot compile JavaHL without a suitable JDK.
:info:configure Please specify a suitable JDK using the --with-jdk option.
:info:configure Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_subversion-javahlbindings/subversion-javahlbindings/work/subversion-1.8.1" && ./configure --prefix=/opt/local --disable-dependency-tracking --with-apr=/opt/local/bin/apr-1-config --with-apr-util=/opt/local/bin/apu-1-config --without-apxs --mandir=\${prefix}/share/man --with-serf=/opt/local --with-sasl=/opt/local --with-libmagic=/opt/local --without-gnome-keyring --enable-javahl --without-jikes --with-junit=/opt/local/share/java/junit.jar --without-berkeley-db
:info:configure Exit code: 1
:error:configure Failed to configure subversion-javahlbindings, consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_subversion-javahlbindings/subversion-javahlbindings/work/subversion-1.8.1/config.log
I manually edited the Portifle and added the following to config.args
:
--with-jdk=/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
I get the same error although I see that it did pass that argument to configure.
How do I specify a JDK for this operation to use?
I solved this problem by installing the latest version of Subclipse. I thought I had the latest installed through Eclipse Marketplace, but it was Subclipse 1.8.x. The latest is 1.10.x . I installed that using the Eclipse URL then running sudo port install subversion-javahlbindings
with no options and everything works.
I'm not evne sure the macports install of the javahl bindings is necessary.
Subclipse download links: http://subclipse.tigris.org/servlets/ProjectProcess?pageID=p4wYuA
If you already have verified that your JAVA_HOME
is pointing to the correct JDK, then try to export your variables with sudo
's -E
switch:
sudo -E port install subversion-javahlbindings +no_bdb +universal
I installed Macports 1.8.2 from a DMG. That seemed to install fine. I ran sudo port selfupdate
to make sure my ports tree was current. I then tried to install bindfs
as I want to mount some directories in my OS X file system (like you can do with mount --bind
in linux).
pkgconfig
and macfuse
are two dependencies of bindfs
. I had trouble installing bindfs
due to errors installing pkgconfig
, so I tried to just install pkgconfig
, here's the debug output from sudo port install pkgconfig
:
$ sudo port -d install pkgconfig
DEBUG: Found port in file:///opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/pkgconfig
DEBUG: Changing to port directory: /opt/local/var/macports/sources/rsync.macports.org/release/ports/devel/pkgconfig
DEBUG: OS Platform: darwin
DEBUG: OS Version: 10.3.0
DEBUG: Mac OS X Version: 10.6
DEBUG: System Arch: i386
DEBUG: setting option os.universal_supported to yes
DEBUG: org.macports.load registered provides 'load', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.unload registered provides 'unload', a pre-existing procedure. Target override will not be provided
DEBUG: org.macports.distfiles registered provides 'distfiles', a pre-existing procedure. Target override will not be provided
DEBUG: adding the default universal variant
DEBUG: Reading variant descriptions from /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/variant_descriptions.conf
DEBUG: Requested variant darwin is not provided by port pkgconfig.
DEBUG: Requested variant i386 is not provided by port pkgconfig.
DEBUG: Requested variant macosx is not provided by port pkgconfig.
---> Computing dependencies for pkgconfig
DEBUG: Executing org.macports.main (pkgconfig)
DEBUG: Skipping completed org.macports.fetch (pkgconfig)
DEBUG: Skipping completed org.macports.checksum (pkgconfig)
DEBUG: Skipping completed org.macports.extract (pkgconfig)
DEBUG: Skipping completed org.macports.patch (pkgconfig)
---> Configuring pkgconfig
DEBUG: Using compiler 'Mac OS X gcc 4.2'
DEBUG: Executing org.macports.configure (pkgconfig)
DEBUG: Environment: CFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2 -m64' LDFLAGS='-L/opt/local/lib' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch x86_64' FFLAGS='-O2 -m64' CC='/usr/bin/gcc-4.2'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/work/pkg-config-0.23" && ./configure --prefix=/opt/local --enable-indirect-deps --with-pc-path=/opt/local/lib/pkgconfig:/opt/local/share/pkgconfig'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... no
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... i386-apple-darwin10.3.0
checking host system type... i386-apple-darwin10.3.0
checking for style of include used by make... none
checking for gcc... /usr/bin/gcc-4.2
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.
Error: Target org.macports.configure returned: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/work/pkg-config-0.23" && ./configure --prefix=/opt/local --enable-indirect-deps --with-pc-path=/opt/local/lib/pkgconfig:/opt/local/share/pkgconfig " returned error 77
DEBUG: Backtrace: configure failure: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_pkgconfig/work/pkg-config-0.23" && ./configure --prefix=/opt/local --enable-indirect-deps --with-pc-path=/opt/local/lib/pkgconfig:/opt/local/share/pkgconfig " returned error 77
while executing
"$procedure $targetname"
Warning: the following items did not execute (for pkgconfig): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install
Error: Status 1 encountered during processing.
I have only recently installed Xcode 3.2.2 (prior to installing macports). Am I right in thinking this the issue here:
configure: error: C compiler cannot create executables
Re-installing Xcode with UNIX development tools enabled me to install pkgconfig.