Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#65144 closed defect (invalid)

MacPorts base fail to build for x86_64 on 10.6.8

Reported by: barracuda156 Owned by:
Priority: Normal Milestone:
Component: base Version: 2.7.2
Keywords: x86_64, snowleopard Cc:
Port:

Description (last modified by barracuda156)

It pulls from somewhere a wrong arch flag here:

gcc-4.2 -m64 -arch x86_64 -std=gnu99 -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch x86_64 -arch i386 -DHAVE_CONFIG_H -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I. -I/Users/svacchanda/Downloads/MacPorts-2.7.2/vendor/vendor-destroot/opt/x86_64/libexec/macports/include -I./../compat  -c -o access.o access.c
gcc-4.2 -m64 -arch x86_64 -std=gnu99 -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch x86_64 -arch i386 -DHAVE_CONFIG_H -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I. -I/Users/svacchanda/Downloads/MacPorts-2.7.2/vendor/vendor-destroot/opt/x86_64/libexec/macports/include -I./../compat  -c -o close.o close.c
gcc-4.2 -m64 -arch x86_64 -std=gnu99 -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch x86_64 -arch i386 -DHAVE_CONFIG_H -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I. -I/Users/svacchanda/Downloads/MacPorts-2.7.2/vendor/vendor-destroot/opt/x86_64/libexec/macports/include -I./../compat  -c -o darwintrace.o darwintrace.c
gcc-4.2 -m64 -arch x86_64 -std=gnu99 -g -O2 -std=c99 -Wextra -Wall   -fPIC -arch x86_64 -arch i386 -DHAVE_CONFIG_H -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I/Users/svacchanda/Downloads/MacPorts-2.7.2/src -I. -I/Users/svacchanda/Downloads/MacPorts-2.7.2/vendor/vendor-destroot/opt/x86_64/libexec/macports/include -I./../compat  -c -o dup2.o dup2.c
lipo: /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccekUkEL.out and /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccki5osG.out have the same architectures (x86_64) and can't be in the same fat output file
make[2]: *** [access.o] Error 1
make[2]: *** Waiting for unfinished jobs....
lipo: /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccCWnuW9.out and /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccZMLTvz.out have the same architectures (x86_64) and can't be in the same fat output file
make[2]: *** [close.o] Error 1
lipo: /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccRNGUmA.out and /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccrRDdP0.out have the same architectures (x86_64) and can't be in the same fat output file
make[2]: *** [dup2.o] Error 1
lipo: /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//ccb0Wnm0.out and /var/folders/RY/RYtBnu68EFaDL2tpwUXYIU+++TI/-Tmp-//cchSUgcT.out have the same architectures (x86_64) and can't be in the same fat output file
make[2]: *** [darwintrace.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

Configure line:

./configure --prefix=/opt/x86_64 --build=x86_64-apple-darwin10 --with-applications-dir=/opt/x86_64/Applications --without-startupitems CC='gcc-4.2 -m64 -arch x86_64' CXX='g++-4.2 -m64 -arch x86_64'

Attachments (1)

MP_10.6.8_gcc42.log (438.5 KB) - added by barracuda156 3 years ago.

Download all attachments as: .zip

Change History (7)

Changed 3 years ago by barracuda156

Attachment: MP_10.6.8_gcc42.log added

comment:1 Changed 3 years ago by barracuda156

Description: modified (diff)

comment:2 Changed 3 years ago by barracuda156

UPD. It does build with ./configure --prefix=/opt/x86_64 --build=x86_64-apple-darwin10 --with-applications-dir=/opt/x86_64/Applications --without-startupitems CC=gcc-4.2 CXX=g++-4.2, but forces arch i386, unasked for.

comment:3 Changed 3 years ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed

Yeah, don't put flags in CC like that.

comment:4 in reply to:  3 ; Changed 3 years ago by barracuda156

Replying to jmroot:

Yeah, don't put flags in CC like that.

With due respect, I disagree here, this is a) legit use and b) exactly required on 10.6.x to build Macports for Rosetta. But the ticket indeed can be closed anyway.

comment:5 Changed 3 years ago by kencu (Ken)

putting in m64 manually wrecks the arch flags for gcc. So it forces arch i386 to build as 64 bit, causing lipo to fail.

so you can’t do that.

comment:6 in reply to:  4 Changed 3 years ago by jmroot (Joshua Root)

Replying to barracuda156:

required on 10.6.x to build Macports for Rosetta.

I really doubt that given that CFLAGS and SHLIB_LDFLAGS are sufficient for all our universal builds.

Note: See TracTickets for help on using tickets.