[90985] trunk/dports/science

Ryan Schmidt ryandesign at macports.org
Wed Mar 21 08:35:16 PDT 2012


On Mar 21, 2012, at 09:11, Leo Singer wrote:

> Attached is a revised Portfile.  I am having trouble with get_canonical_archflags.  After adding to build.post_args-append:
> 
>                    CC="${configure.cc} [get_canonical_archflags cc]" \
>                    CL="${configure.cc} [get_canonical_archflags ld]" \
>                    CXX="${configure.cxx} [get_canonical_archflags cxx]" \
>                    CXXL="${configure.cxx} [get_canonical_archflags ld]"
> 
> I get the following error message:
> 
> :info:build shell command "/usr/bin/make HEALPIX_TARGET=osx BINDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_healpix/healpix/work/Healpix_2.20a/bin LIBDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_healpix/healpix/work/Healpix_2.20a/lib INCDIR=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_science_healpix/healpix/work/Healpix_2.20a/include EXTERNAL_CFITSIO=yes CFITSIO_INCDIR=/opt/local/include CFITSIO_LIBDIR=/opt/local/lib CFITSIO_EXT_LIB=/opt/local/lib/libcfitsio.a CFITSIO_EXT_INC=/opt/local/include CC=\"/usr/bin/llvm-gcc-4.2 {-arch x86_64"} CL=\"/usr/bin/llvm-gcc-4.2 {-arch x86_64"} CXX=\"/usr/bin/llvm-g++-4.2 {-arch x86_64"} CXXL=\"/usr/bin/llvm-g++-4.2 {-arch x86_64"}" returned error 2

The problem is how you're constructing the build command:

build {
    system "${build.cmd} -C ${worksrcpath}/src/cxx ${build.post_args}"
    system "${build.cmd} -C ${worksrcpath}/src/C/subs static install AR=\"ar -rsv\" ${build.post_args}"
}

Instead of referencing ${build.post_args} directly, use [join ${build.post_args}].

The build process currently hides the actual compile commands from us, making it not totally easy to see whether we've succeeded. If you can make the build output more verbosely that would be great.




More information about the macports-dev mailing list