Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#30342 closed update (fixed)

Update ARB for Lion (OS X 10.7) and Xcode 4

Reported by: matt.cottrell@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.0.0
Keywords: lion haspatch maintainer Cc: ryandesign (Ryan Carsten Schmidt), chris@…
Port: arb

Description

Xcode 4 introduces a default compiler (llvm-gcc-4.2) that does not work with ARB. This patch updates the Portfile to set the compiler to gcc-apple-4.2.

Attachments (10)

patch-ARB-makefile.diff (2.9 KB) - added by matt.cottrell@… 13 years ago.
Makefile diff
Portfile (10.2 KB) - added by matt.cottrell@… 13 years ago.
patch-ARB-count.c.diff (528 bytes) - added by matt.cottrell@… 13 years ago.
patch-ARB-Flatio.diff (450 bytes) - added by matt.cottrell@… 13 years ago.
patch-ARB-interface.c.diff (261 bytes) - added by matt.cottrell@… 13 years ago.
patch-ARB-lsadt.c.diff (969 bytes) - added by matt.cottrell@… 13 years ago.
patch-ARB-Zuk_to_gen.c.diff (265 bytes) - added by matt.cottrell@… 13 years ago.
Portfile.diff (1.4 KB) - added by matt.cottrell@… 13 years ago.
Portfile diff
main.log.bz2 (14.1 KB) - added by ryandesign (Ryan Carsten Schmidt) 13 years ago.
Xcode version.tiff (13.6 KB) - added by matt.cottrell@… 13 years ago.

Download all attachments as: .zip

Change History (27)

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

Cc: ryandesign@… added; Ryan Schmidt <ryandesign@…> removed
Keywords: lion haspatch maintainer added; Lion Xcode 4 compiler removed

Cc field must be an email address only.

Why require gcc-apple-4.2? Why not use Xcode's gcc-4.2 on systems that have it (Leopard and above)?

Why change from using the proper configure.cc/.cxx/.cpp variables to hardcoding them? You want to set configure.compiler instead and leave the others alone.

Did you try the compiler clang? If clang works, it should be used in preference to the other options.

Your patch also drops the revision from 1 to 0, which is not desired.

comment:2 in reply to:  1 ; Changed 13 years ago by matt.cottrell@…

Replying to ryandesign@…:

Cc field must be an email address only.

Why require gcc-apple-4.2? Why not use Xcode's gcc-4.2 on systems that have it (Leopard and above)?

Why change from using the proper configure.cc/.cxx/.cpp variables to hardcoding them? You want to set configure.compiler instead and leave the others alone.

Did you try the compiler clang? If clang works, it should be used in preference to the other options.

Your patch also drops the revision from 1 to 0, which is not desired.

Set configure.compiler gcc-4.2. Incremented revision to 2. Compiler clang failed to build arb.

comment:3 in reply to:  2 Changed 13 years ago by matt.cottrell@…

Replying to matt.cottrell@…:

Replying to ryandesign@…:

Cc field must be an email address only.

Why require gcc-apple-4.2? Why not use Xcode's gcc-4.2 on systems that have it (Leopard and above)?

Why change from using the proper configure.cc/.cxx/.cpp variables to hardcoding them? You want to set configure.compiler instead and leave the others alone.

Did you try the compiler clang? If clang works, it should be used in preference to the other options.

Your patch also drops the revision from 1 to 0, which is not desired.

Set configure.compiler gcc-4.2. Incremented revision to 2. Compiler clang failed to build arb.

Cleaned up typos and uploaded the corrected Portfile diff.

comment:4 Changed 13 years ago by jmroot (Joshua Root)

This is how you need to fall back to gcc-4.2 such that it should work on all platforms:

if {${configure.compiler} == "clang" ||
    ${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler gcc-4.2
    if {![file executable ${configure.cc}]} {
        depends_build-append port:apple-gcc42
        configure.compiler apple-gcc-4.2
    }
}

As suggested by jeremyhu: http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html

comment:5 Changed 13 years ago by matt.cottrell@…

I'm ferreting out why arb does not build with clang. It seems to be a problem with CPP.

I configured clang as the compiler and set the following build arguments:

                        configure.compiler clang
                        
build.args              GCC=${configure.cc} \
                        GPP=${configure.cxx} \
                        CPPreal=${configure.cpp}

But it appears that ${configure.cpp} is empty.

shell command " cd "/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779" && /usr/bin/make -j2 -w all GCC=/Developer/usr/bin/clang GPP=/Developer/usr/bin/clang++ CPPreal= " returned error 2

What can I do to satisfy the CPPreal needs of arb?

comment:6 Changed 13 years ago by matt.cottrell@…

The upstream developer is working on this with me. I sent him the llvm-g++-4.2 error and the clang error. If you are curious they look like this:

llvm-g++-4.2 error building ARB:

-------------------- Checking bin/arb_dist
Target 'bin/arb_dist' not found
-> rebuilding bin/arb_dist (Wed Dec 31 20:59:59 1969)
Link bin/arb_dist
/Developer/usr/bin/llvm-g++-4.2   -arch x86_64   -o bin/arb_dist -L/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/LIBLINK PROBE_COM/client.a DIST/DIST.a SERVERCNTRL/SERVERCNTRL.a CONSENSUS_TREE/CONSENSUS_TREE.a EISPACK/EISPACK.a SL/HELIX/HELIX.a XML/XML.a  -lARBDB  -lstdc++ -lAW -lAWT -L/opt/local/lib -lXm -lpng -lz -lXt -lX11 -lXext -lXp -lXmu -lXi -lGLU -lGL -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
Undefined symbols for architecture x86_64:
  "_llvm.eh.catch.all.value437", referenced from:
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      ...
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [bin/arb_wetc] Error 1
make[2]: *** Waiting for unfinished jobs....
Undefined symbols for architecture x86_64:
  "_llvm.eh.catch.all.value950", referenced from:
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      anon in lto.o
      ...
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [bin/arb_dist] Error 1
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
make[1]: *** [arb] Error 2
make[1]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
shell command " cd "/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779" && /usr/bin/make -j2 -w all GCC=/Developer/usr/bin/llvm-gcc-4.2 GPP=/Developer/usr/bin/llvm-g++-4.2 CPPreal=/Developer/usr/bin/llvm-cpp-4.2 " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for arb): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for arb is at: /opt/local/var/macports/logs/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

clang error building ARB:

-------------------------------------------------------------------------------- Make everything in GDE
make[2]: Entering directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE'
----------------- non-ARB code: warnings disabled
/usr/bin/make CLUSTAL/CLUSTAL.dummy SUPPORT/SUPPORT.dummy MOLPHY/MOLPHY.dummy AxML/AxML.dummy RAxML/RAxML.dummy PHYML/PHYML.dummy  CLUSTALW/CLUSTALW.dummy PHYLIP/PHYLIP.dummy TREEPUZZLE/TREEPUZZLE.dummy FASTDNAML/FASTDNAML.dummy 
make[3]: Entering directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE'
make[4]: Entering directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE/SUPPORT'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_SUPPORT -o /opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/bin/CAP2 CAP2.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers -lm
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_SUPPORT -o /opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/bin/Restriction Restriction.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers -lm
clang: warning: argument unused during compilation: '-no-cpp-precomp'
In file included from Restriction.c:5:
./Flatio.c:27:9: error: non-void function 'ErrorOut' should return a value [-Wreturn-type]
        return;
        ^
./Flatio.c:166:9: error: non-void function 'WriteData' should return a value [-Wreturn-type]
        return;
        ^
2 errors generated.
make[4]: *** [/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/bin/Restriction] Error 1
make[4]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE/SUPPORT'
make[3]: *** [SUPPORT/SUPPORT.dummy] Error 1
make[3]: *** Waiting for unfinished jobs....
make[4]: Entering directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE/CLUSTAL'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o clustalv.o clustalv.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o amenu.o amenu.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o myers.o myers.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o sequence.o sequence.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o showpair.o showpair.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o upgma.o upgma.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o util.o util.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o trees.o trees.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -c -o gcgcheck.o gcgcheck.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -w -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_GDE -DIN_ARB_CLUSTAL -o /opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/bin/clustalv clustalv.o amenu.o myers.o sequence.o showpair.o upgma.o util.o trees.o gcgcheck.o -lm
clang: warning: argument unused during compilation: '-no-cpp-precomp'
make[4]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE/CLUSTAL'
make[3]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE'
make[2]: *** [GDE.a] Error 2
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/GDE'
make[1]: *** [GDE/GDE.dummy] Error 1
make[1]: *** Waiting for unfinished jobs....
-------------------------------------------------------------------------------- Make everything in CONVERTALN
make[3]: Entering directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/CONVERTALN'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c main.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c fconv.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c mg.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c genbank.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c macke.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c phylip.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c paup.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c util.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c date.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c embl.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c gcg.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c printable.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c alma.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c routines.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang -O4 -arch x86_64 -no-cpp-precomp -pipe -fmessage-length=0 -funit-at-a-time -fPIC -DARB_OPENGL  -W -Wall -DNDEBUG -DARB_64  -DDARWIN    -DFAKE_VTAB_PTR=char -DIN_ARB_CONVERTALN -Wstrict-prototypes -c convert.c -I. -I/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/INCLUDE -I/opt/local/include -I/System/Library/Frameworks/OpenGL.framework/Headers -I/usr/include/krb5 -I/System/Library/Frameworks/GLUT.framework/Headers 
clang: warning: argument unused during compilation: '-no-cpp-precomp'
/Developer/usr/bin/clang++   -arch x86_64   -o /opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/bin/arb_convert_aln main.o fconv.o mg.o genbank.o macke.o phylip.o paup.o util.o date.o embl.o gcg.o printable.o alma.o routines.o convert.o ../SL/FILE_BUFFER/FILE_BUFFER.a -L/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/LIBLINK -lARBDB
make[3]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779/CONVERTALN'
make[2]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
make[1]: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779'
shell command " cd "/opt/local/var/macports/build/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/work/arbsrc_6779" && /usr/bin/make -j2 -w all GCC=/Developer/usr/bin/clang GPP=/Developer/usr/bin/clang++ CPPreal= " returned error 2
Error: Target org.macports.build returned: shell command failed (see log for details)
Warning: the following items did not execute (for arb): org.macports.activate org.macports.build org.macports.destroot org.macports.install
Log for arb is at: /opt/local/var/macports/logs/_Users_cottrell_Documents_Programming_MacPorts_ports_science_arb/arb/main.log
Error: Status 1 encountered during processing.
To report a bug, see <http://guide.macports.org/#project.tickets>

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-makefile.diff added

Makefile diff

Changed 13 years ago by matt.cottrell@…

Attachment: Portfile added

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-count.c.diff added

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-Flatio.diff added

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-interface.c.diff added

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-lsadt.c.diff added

Changed 13 years ago by matt.cottrell@…

Attachment: patch-ARB-Zuk_to_gen.c.diff added

comment:7 in reply to:  6 Changed 13 years ago by matt.cottrell@…

ARB now builds on OS X 10.7 Lion using clang with the attached patches.

comment:8 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

The compiler selection block seems very confused. What you've written is:

if {${configure.compiler} == "clang" ||
    ${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler clang
    if {![file executable ${configure.cc}]} {
        depends_build-append port:apple-gcc42
        configure.compiler apple-gcc-4.2
    }
}

What this is saying is: If the compiler is clang or llvm-gcc-4.2, set the compiler to clang, and if that does not exist, then use the apple-gcc-4.2 port.

I think what you did was take a block that was meant to ensure the use of gcc-4.2 on systems that would otherwise use llvm-gcc-4.2 or clang, and modified it. As written, the original block made sense:

if {${configure.compiler} == "clang" ||
    ${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler gcc-4.2
    if {![file executable ${configure.cc}]} {
        depends_build-append port:apple-gcc42
        configure.compiler apple-gcc-4.2
    }
}

This says: If the compiler is clang or llvm-gcc-4.2, set the compiler to gcc-4.2, and if that does not exist, then use the apple-gcc-4.2 port.

For arb, I think what you want to write is quite simply:

if {${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler clang
}

Changed 13 years ago by matt.cottrell@…

Attachment: Portfile.diff added

Portfile diff

comment:9 in reply to:  8 Changed 13 years ago by matt.cottrell@…

Replying to ryandesign@…:

The compiler selection block seems very confused.

For arb, I think what you want to write is quite simply:

if {${configure.compiler} == "llvm-gcc-4.2"} {
    configure.compiler clang
}

Thanks. I've uploaded a revised Portfile.diff with that much simpler statement. Get's right to the point. How about the other proposed patches? They look okay? If so, are we ready to commit?

comment:10 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

It does not build on Snow Leopard with Xcode 3.2.6. I'll attach the complete log.

Also, there are some reinplaces that (now?) do nothing that perhaps need to be revised or removed.

Warning: reinplace s| sed | gsed |g didn't change anything in /opt/local/var/macports/build/_Users_rschmidt_macports_dports_science_arb/work/arbsrc_6779/util/arb_check_build_env.pl
Warning: reinplace s| sed | gsed |g didn't change anything in /opt/local/var/macports/build/_Users_rschmidt_macports_dports_science_arb/work/arbsrc_6779/arb_install.sh
Warning: reinplace s|OSX_SDK:=/Developer/SDKs/MacOSX10.5.sdk|OSX_SDK:=|g didn't change anything in /opt/local/var/macports/build/_Users_rschmidt_macports_dports_science_arb/work/arbsrc_6779/Makefile

(These warnings appear courtesy of the patch in #15514.)

Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

comment:11 in reply to:  10 ; Changed 13 years ago by matt.cottrell@…

Replying to ryandesign@…:

It does not build on Snow Leopard with Xcode 3.2.6. I'll attach the complete log.

Also, there are some reinplaces that (now?) do nothing that perhaps need to be revised or removed.

That is very strange. The proposed changes build ARB for me on Snow Leopard with Xcode 3.2.6. Fortunately, I do have another machine running that set up.

The error you are getting is nothing I've seen before and nowhere near where we are patching.

:info:build -------------------- Checking bin/arb_ntree
:info:build Target 'bin/arb_ntree' not found
:info:build -> rebuilding bin/arb_ntree (Wed Dec 31 17:59:59 1969)
:info:build Link bin/arb_ntree
:info:build /usr/bin/g++-4.2   -arch x86_64   -o bin/arb_ntree -L/opt/local/var/macports/build/_Users_rschmidt_macports_dports_science_arb/work/arbsrc_6779/LIBLINK PROBE_COM/client.a ARB_GDE/ARB_GDE.a AWTC/AWTC.a AWTI/AWTI.a GENOM/GENOM.a GENOM_IMPORT/GENOM_IMPORT.a MERGE/MERGE.a MULTI_PROBE/MULTI_PROBE.a NTREE/NTREE.a PRIMER_DESIGN/PRIMER_DESIGN.a PROBE_DESIGN/PROBE_DESIGN.a SEQ_QUALITY/SEQ_QUALITY.a SERVERCNTRL/SERVERCNTRL.a SL/AW_NAME/AW_NAME.a SL/DB_SCANNER/DB_SCANNER.a SL/FILE_BUFFER/FILE_BUFFER.a SL/HELIX/HELIX.a SL/REGEXPR/REGEXPR.a SL/TREE_READ/TREE_READ.a SL/TREE_WRITE/TREE_WRITE.a STAT/STAT.a XML/XML.a  -lARBDB  -lstdc++ -lAW -lAWT -L/opt/local/lib -lXm -lpng -lz -lXt -lX11 -lXext -lXp -lXmu -lXi -lGLU -lGL -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
:info:build ld: in AWTC/AWTC.a, section not found for address 0x0000689E
:info:build collect2: ld returned 1 exit status
:info:build make[2]: *** [bin/arb_ntree] Error 1
:info:build make[1]: *** [arb] Error 2
:info:build make: *** [all] Error 2

It's such a strange error that I suspect a corrupted source file. I'm reaching here because I cannot reproduce your failure. Can you download a fresh copy of the source and try again?

We'll deal with the reinplaces after all is well with the build. Thanks for the heads up.

comment:12 in reply to:  11 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to matt.cottrell@…:

It's such a strange error that I suspect a corrupted source file. I'm reaching here because I cannot reproduce your failure. Can you download a fresh copy of the source and try again?

You mean the ARB distfile? We already know it is not corrupted because if it had been MacPorts would have ended with a checksum error.

The port fails to build with the same error even without the patches from this ticket. Of course it built ok when I committed the update to the current version in r76582. So that probably means one of arb's dependencies was updated, and this is causing the problem. I suspect mesa, since that's what provides libGL.dylib in MacPorts, while the error message shows the use of Apple's copy of libGL.dylib in /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. arb should either use Apple's copy and not declare a dependency on mesa, or (probably) should use the MacPorts copy in mesa, and not use Apple's.

If you're not seeing this error, are your ports up to date? sudo port selfupdate && sudo port upgrade outdated.

comment:13 in reply to:  12 Changed 13 years ago by matt.cottrell@…

Replying to ryandesign@…:

Replying to matt.cottrell@…:

It's such a strange error that I suspect a corrupted source file. I'm reaching here because I cannot reproduce your failure. Can you download a fresh copy of the source and try again?

You mean the ARB distfile? We already know it is not corrupted because if it had been MacPorts would have ended with a checksum error.

The port fails to build with the same error even without the patches from this ticket. Of course it built ok when I committed the update to the current version in r76582. So that probably means one of arb's dependencies was updated, and this is causing the problem. I suspect mesa, since that's what provides libGL.dylib in MacPorts, while the error message shows the use of Apple's copy of libGL.dylib in /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib. arb should either use Apple's copy and not declare a dependency on mesa, or (probably) should use the MacPorts copy in mesa, and not use Apple's.

If you're not seeing this error, are your ports up to date? sudo port selfupdate && sudo port upgrade outdated.

It will take some time for my Snow Leopard to run "upgrade outdated." You could be right about mesa. That was one of the most difficult parts of generating the original port from Linux to Mac OS X. I wouldn't be surprised if it was the weak link.

The makefile specifies where to find libGl.dylib like this:

XLIBS += -lGLU -lGL -Wl,-dylib_file,$(OSX_FW_OPENGL)/libGL.dylib:$(OSX_FW_OPENGL)/libGL.dylib

The fix may be as simple as removing that instruction. I assume that if MacPorts installs mesa then nothing special must be done to help the arb build find the libGl.dylib that MacPorts mesa provides.

comment:14 Changed 13 years ago by chris@…

Cc: chris@… added

Cc Me!

Changed 13 years ago by matt.cottrell@…

Attachment: Xcode version.tiff added

comment:15 in reply to:  14 ; Changed 13 years ago by matt.cottrell@…

ARB continues to build for me on Snow Leopard with the latest MacPorts (2.0) and Xcode 3.2.6. We need to identify what is going on with your system that is different from mine.

cottrell% port installed | grep arb
  arb @5.2_1 (active)
cottrell% port version
Version: 2.0.0
cottrell% sw_vers
ProductName:	Mac OS X
ProductVersion:	10.6.8
BuildVersion:	10K540

comment:16 in reply to:  15 ; Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: newclosed

Replying to matt.cottrell@…:

ARB continues to build for me on Snow Leopard with the latest MacPorts (2.0) and Xcode 3.2.6.

Meanwhile, I downgraded mesa to the previous version and that didn't help either.

I'm taking your word that these changes work on your system, and have committed them in r81222. I'll file a new ticket for the build error I'm seeing.

comment:17 in reply to:  16 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I'll file a new ticket for the build error I'm seeing.

#30406

Note: See TracTickets for help on using tickets.