[MacPorts] #24923: RFE: Allow atlas to build universal
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Adding (32/64-bit) universal support has been discussed on the mailing list:[[BR]] http://lists.macosforge.org/pipermail/macports- dev/2010-March/thread.html#11407 There is also a proposed change:[[BR]] http://lists.macosforge.org/pipermail/macports-dev/2010-May/011870.html Attached is another proposed change.[[BR]] It uses the muniversal PortGroup to actually merge the architectures.[[BR]] As far as I can tell, it does not require any changes to gcc (such as --enable-multilib). -- Ticket URL: <http://trac.macports.org/ticket/24923> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): If I understand your portfile correctly, universal conflicts with the use of any gcc-mp compilers. At the same time, how do you compile universal Fortran sources? -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:1 vince@…]:
If I understand your portfile correctly, universal conflicts with the use of any gcc-mp compilers. At the same time, how do you compile universal Fortran sources? If neither the gcc42 nor the gcc43 variant is selected, then gcc 4.4 is used.[[BR]] The relevant code is {{{ if { [variant_isset gcc42] } { set gccversion 4.2 } elseif { [variant_isset gcc43] } { set gccversion 4.3 } else { set gccversion 4.4 } }}}
-- Ticket URL: <http://trac.macports.org/ticket/24923#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): Then your gcc44 variant can compile universal binaries, whereas gcc42 and 43 cannot, right? -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:3 vince@…]:
Then your gcc44 variant can compile universal binaries, whereas gcc42 and 43 cannot, right? Yes, that is correct.[[BR]] I could only get GCC 4.4 to work correctly, so it is used unless the user specifically asks for another version (in which case universal support is not possible).
-- Ticket URL: <http://trac.macports.org/ticket/24923#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): But how do you get Fortran sources compiled with gcc44 ? -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:5 vince@…]:
But how do you get Fortran sources compiled with gcc44 ? If no variants are selected, then gccversion is set to 4.4.
The code {{{ configure.compiler macports-gcc-${gccversion} }}} sets configure.f77 to ${prefix}/bin/gfortran-mp-4.4 Then the code {{{ configure.args -C xc ${configure.cc} \ -C gc ${configure.cc} \ -C if ${configure.f77} \ -C ic ${configure.cc} \ -C dm ${configure.cc} \ -C sm ${configure.cc} \ -C dk ${configure.cc} \ -C sk ${configure.cc} \ --cc=${configure.cc} \ -b ${my_arch} \ -Fa alg -fPIC }}} tells the configure script which Fortran compiler to use. -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): Ok, I am still puzzled that you can compile i386/x86_64 code without having the proper libs. For example, libptf77blas has a dependency to libgfortran, which is not universal unless you build it with --enable- multilib. Yet, I might be wrong. -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:7 vince@…]:
Ok, I am still puzzled that you can compile i386/x86_64 code without having the proper libs. For example, libptf77blas has a dependency to libgfortran, which is not universal unless you build it with --enable- multilib. Yet, I might be wrong. The muniversal PortGroup basically performs the configure, build, destroot, and test phases twice.[[BR]] The first time, -m32 is passed to the fortran compiler to build i386 or ppc libraries.[[BR]] The second time, -m64 is passed to build x86_64 or ppc64 libraries.[[BR]] After the destroot phase, the muniversal PortGroup merges the two installations using, among other things, lipo to form a universal installation.
-- Ticket URL: <http://trac.macports.org/ticket/24923#comment:8> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): Ok, I know this. What reports otool -L ${prefix}/lib/libptf77blas in your case? Here is mine: {{{ otool -arch i386 -L libptf77blas.dylib libptf77blas.dylib: /usr/pkg/lib/libptf77blas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/pkg/lib/gcc45/i386/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/pkg/lib/libatlas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) otool -arch x86_64 -L libptf77blas.dylib libptf77blas.dylib: /usr/pkg/lib/libptf77blas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/pkg/lib/gcc45/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0) /usr/pkg/lib/libatlas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) }}} You see that the two versions (one for i386 and one for x86_64) link to the appropriate version of libgfortran.dylib. But, AFAIK, these two libgfortran libs are not generated unless you specify --enable-multilib when compiling gcc (without --enable-multilib, you get the one your default arch requires). Is your gcc44 built universal? -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:9> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:9 vince@…]:
Ok, I know this. What reports otool -L ${prefix}/lib/libptf77blas in your case? Here is mine:
Here is the result: {{{ otool -L /opt/local/lib/libptf77blas.dylib /opt/local/lib/libptf77blas.dylib: /opt/local/lib/libptf77blas.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/gcc44/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0) /opt/local/lib/libatlas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) otool -arch i386 -L /opt/local/lib/libptf77blas.dylib /opt/local/lib/libptf77blas.dylib: /opt/local/lib/libptf77blas.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/gcc44/i386/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0) /opt/local/lib/libatlas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) otool -arch x86_64 -L /opt/local/lib/libptf77blas.dylib /opt/local/lib/libptf77blas.dylib: /opt/local/lib/libptf77blas.dylib (compatibility version 0.0.0, current version 0.0.0) /opt/local/lib/gcc44/libgfortran.3.dylib (compatibility version 4.0.0, current version 4.0.0) /opt/local/lib/libatlas.dylib (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.0.1) }}} During the call to ld, I included -L${prefix}/lib/gcc${gccnumber}/${arch} before[[BR]] -L${prefix}/lib/gcc${gccnumber} so that -lgfortran would find the correct architecture library. I must admit that I do not know much about --enable-multilib, but I have not changed the gcc44 port,[[BR]] and I seem to have both libraries. -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:10> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by vince@…): What is the output of gcc-mp-4.4 -v ? Also, what do you get in ${prefix}/include/atlas ? Here, you should have include files with different values, one for 32 and one for 64bit. Ex: {{{ more atlas_buildinfo.h #ifdef __LP64__ #ifndef ATL_INSTINFO_H #define ATL_INSTINFO_H #define ATL_ARCH "Core264SSE3" #define ATL_INSTFLAGS "-1 0 -a 1" #define ATL_F2CDEFS "-DAdd_ -DF77_INTEGER=int -DStringSunStyle" #define ATL_ARCHDEFS "-DATL_OS_OSX -DATL_ARCH_Core2 -DATL_CPUMHZ=2400 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_GAS_x8664 -DATL_SSE3 -DATL_AVgcc" #define ATL_DKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64" #define ATL_DKC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_SKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64" #define ATL_SKC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_DMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64" #define ATL_DMC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_SMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m64" #define ATL_SMC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_ICCFLAGS "-DL2SIZE=4194304 -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-64/include -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-64/..//include -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-64/..//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_OSX -DATL_ARCH_Core2 -DATL_CPUMHZ=2400 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_USE64BITS -DATL_" #define ATL_ICC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_F77FLAGS "-O -fPIC -m64" […] #endif #endif #ifdef __LP32__ #ifndef ATL_INSTINFO_H #define ATL_INSTINFO_H #define ATL_ARCH "Core232SSE3" #define ATL_INSTFLAGS "-1 0 -a 1" #define ATL_F2CDEFS "-DAdd_ -DF77_INTEGER=int -DStringSunStyle" #define ATL_ARCHDEFS "-DATL_OS_OSX -DATL_ARCH_Core2 -DATL_CPUMHZ=2400 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_GAS_x8632 -DATL_SSE3 -DATL_AVgcc" #define ATL_DKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m32" #define ATL_DKC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_SKCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m32" #define ATL_SKC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_DMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m32" #define ATL_DMC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_SMCFLAGS "-fomit-frame-pointer -mfpmath=sse -msse3 -O2 -fPIC -m32" #define ATL_SMC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_ICCFLAGS "-DL2SIZE=4194304 -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-32/include -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-32/..//include -I/usr/pkg/var/macports/build/_Users_vincent_Developpement_ports_maths_atlas/work/atlas-3.8.3/build-32/..//include/contrib -DAdd_ -DF77_INTEGER=int -DStringSunStyle -DATL_OS_OSX -DATL_ARCH_Core2 -DATL_CPUMHZ=2400 -DATL_SSE3 -DATL_SSE2 -DATL_SSE1 -DATL_GAS_x8632 -DATL_" #define ATL_ICC "/usr/pkg/bin/gcc-mp-4.5" #define ATL_F77FLAGS "-O -fPIC -m32" […] #endif #endif }}} (I have omitted lines which are the same for 32 and 64-bit builds) -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:11> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal -----------------------------------+---------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: atlas universal | Port: atlas -----------------------------------+---------------------------------------- Comment(by mcalhoun@…): Replying to [comment:11 vince@…]:
What is the output of gcc-mp-4.4 -v ?
gcc-mp-4.4 -v gives {{{ Using built-in specs. Target: x86_64-apple-darwin10 Configured with: ../gcc-4.4.4/configure --prefix=/opt/local --build=x86_64 -apple-darwin10 --enable-languages=c,c++,objc,obj-c++,java,fortran --libdir=/opt/local/lib/gcc44 --includedir=/opt/local/include/gcc44 --infodir=/opt/local/share/info --mandir=/opt/local/share/man --with- local-prefix=/opt/local --with-system-zlib --disable-nls --program- suffix=-mp-4.4 --with-gxx-include-dir=/opt/local/include/gcc44/c++/ --with-gmp=/opt/local --with-mpfr=/opt/local --enable-stage1-checking --enable-fully-dynamic-string Thread model: posix gcc version 4.4.4 (GCC) }}}
Also, what do you get in ${prefix}/include/atlas ? Here, you should have
include files with different values, one for 32 and one for 64bit. Each of the following files have an {{{#ifndef __LP64__}}} statement in them: {{{ atlas_buildinfo.h atlas_cNCmm.h atlas_cacheedge.h atlas_cmv.h atlas_cmvS.h atlas_cmvT.h atlas_cr1.h atlas_csysinfo.h atlas_dNCmm.h atlas_dmv.h atlas_dmvS.h atlas_dmvT.h atlas_dr1.h atlas_dsysinfo.h atlas_dtrsmXover.h atlas_sNCmm.h atlas_smv.h atlas_smvS.h atlas_sr1.h atlas_ssysinfo.h atlas_trsmNB.h atlas_zNCmm.h atlas_zmv.h atlas_zmvS.h atlas_zmvT.h atlas_zr1.h atlas_zsysinfo.h cXover.h cmm.h dXover.h dmm.h sXover.h smm.h zXover.h zmm.h }}} -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:12> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24923: RFE: Allow atlas to build universal ------------------------------------+--------------------------------------- Reporter: mcalhoun@… | Owner: jameskyle@… Type: enhancement | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: fixed | Keywords: atlas universal Port: atlas | ------------------------------------+--------------------------------------- Changes (by mcalhoun@…): * status: new => closed * resolution: => fixed Comment: Fixed in r68232 (maintainer timeout). -- Ticket URL: <http://trac.macports.org/ticket/24923#comment:14> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts