Opened 11 years ago

Closed 11 years ago

#24673 closed defect (fixed)

mlt universal variant doesn't build universal software

Reported by: ryandesign (Ryan Schmidt) Owned by: ddennedy (Dan Dennedy)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc:
Port: mlt

Description

mlt's universal variant doesn't end up building universal software:

$ sudo port install mlt +universal
--->  Computing dependencies for mlt
--->  Fetching mlt
--->  Verifying checksum(s) for mlt
--->  Extracting mlt
--->  Configuring mlt
--->  Building mlt
--->  Staging mlt into destroot
--->  Installing mlt @0.5.2_0+universal
--->  Activating mlt @0.5.2_0+universal
--->  Cleaning mlt
$ lipo -info /opt/local/lib/libmlt.dylib 
Non-fat file: /opt/local/lib/libmlt.dylib is architecture: x86_64

Please either fix mlt's universal variant so it builds universal software (preferred) or just disable mlt's universal variant.

Change History (3)

comment:1 Changed 11 years ago by ddennedy (Dan Dennedy)

Before I just give up, let me ask a question.. The Portfile has a "build.env CFLAGS="${configure.cflags}" LDFLAGS="${configure.ldflags}" line, and I see that reflected in the build phase environment:

DEBUG: Environment: CFLAGS='-O2 -I/opt/local/include -I/opt/local/libexec/qt4-mac/include -arch x86_64 -arch i386' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-O2 -arch x86_64 -arch i386' MACOSX_DEPLOYMENT_TARGET='10.6' PKG_CONFIG_PATH='/opt/local/lib/pkgconfig:/opt/local/libexec/qt4-mac/lib/pkgconfig' CXX='/usr/bin/g++-4.2' F90FLAGS='-O2' LDFLAGS='-L/opt/local/lib -L/opt/local/lib -arch x86_64 -arch i386' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-O2' INSTALL='/usr/bin/install -c' OBJCFLAGS='-O2 -arch x86_64 -arch i386' FFLAGS='-O2' CC='/usr/bin/gcc-4.2' PKG_CONFIG='/opt/local/bin/pkg-config'
...
DEBUG: Executing org.macports.build (mlt)
DEBUG: Environment: CFLAGS='-O2 -I/opt/local/include -I/opt/local/libexec/qt4-mac/include' MACOSX_DEPLOYMENT_TARGET='10.6' LDFLAGS='-L/opt/local/lib -L/opt/local/lib'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_ddennedy_ports_multimedia_mlt/work/mlt" && /usr/bin/nice -n 10 /usr/bin/make -j1 all CC="/usr/bin/gcc-4.2" CXX="/usr/bin/g++-4.2" CPP="/usr/bin/cpp-4.2"'

But why do I not see the -arch flags in the compilation lines?

/usr/bin/gcc-4.2 -O2 -I/opt/local/include -I/opt/local/libexec/qt4-mac/include -Wall -fPIC -DPIC   -O2 -pipe -fomit-frame-pointer -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DARCH_X86_64 -D__DARWIN__ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -Wall -fPIC -DPIC   -O2 -pipe -fomit-frame-pointer -DUSE_MMX -DUSE_SSE -DUSE_SSE2 -g -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DARCH_X86_64 -D__DARWIN__ -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE  -DPREFIX="\"/opt/local\"" -DLIBDIR="\"/opt/local/lib\""   -c -o mlt_frame.o mlt_frame.c

I see other flags like the include dirs getting picked up, but why not the -arch options? What happened to them? My Makefiles use CFLAGS+= and do nothing special to filter out arch options.

comment:2 Changed 11 years ago by ddennedy (Dan Dennedy)

Ah, well, it is probably moot because mlt has a lot of dependencies and probably suffers the same fate as kmymoney: r66851 Ja?

comment:3 Changed 11 years ago by ryandesign (Ryan Schmidt)

Resolution: fixed
Status: newclosed

During the configure phase, MacPorts sets the CFLAGS variable to the value of ${configure.cflags} plus the value of either ${configure.universal_cflags} (if building universal) or ${configure.cc_archflags} (if not building universal). mlt doesn't use a configure script, so it doesn't see these. It looks at the CFLAGS variable in the build phase, where you only give it the value of ${configure.cflags}. Similarly for CPPFLAGS, CXXFLAGS, LDFLAGS, if applicable.

Yes, you're right, mlt's dependency ffmpeg-devel is not universal, so mlt can't be universal. Marked mlt as not universal in r67264.

Note: See TracTickets for help on using tickets.