Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24936 closed defect (fixed)

makeicns should ensure it's UsingTheRightCompiler

Reported by: ryandesign (Ryan Schmidt) Owned by: mkae (Marko Käning)
Priority: Normal Milestone:
Component: ports Version: 1.8.2
Keywords: Cc: pixilla (Bradley Giesbrecht)
Port: makeicns

Description

makeicns should ensure it's UsingTheRightCompiler:

--->  Fetching makeicns
--->  Verifying checksum(s) for makeicns
--->  Extracting makeicns
--->  Configuring makeicns
--->  Building makeicns
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_makeicns/work/makeicns" && /usr/bin/nice -n 10 /usr/bin/make -j2 " returned error 2
Command output: cc -fpascal-strings -O2 -arch ppc -arch i386   -c -o makeicns.o makeicns.m
cc -fpascal-strings -O2 -arch ppc -arch i386   -c -o IconFamily.o IconFamily.m
cc -fpascal-strings -O2 -arch ppc -arch i386 -c -o IconFamily.o IconFamily.m
cc: Error: You should be using ${configure.cc}
See http://trac.macports.org/wiki/UsingTheRightCompiler
make: *** [IconFamily.o] Error 1
make: *** Waiting for unfinished jobs....
cc -fpascal-strings -O2 -arch ppc -arch i386 -c -o makeicns.o makeicns.m
cc: Error: You should be using ${configure.cc}
See http://trac.macports.org/wiki/UsingTheRightCompiler
make: *** [makeicns.o] Error 1

Attachments (1)

Portfile-makeicns.diff (917 bytes) - added by mkae (Marko Käning) 11 years ago.
Hi Ryan, here is version 1.4 of makeicns which now uses $(CXX) to build taking into account UsingTheRightCompiler.

Download all attachments as: .zip

Change History (7)

Changed 11 years ago by mkae (Marko Käning)

Attachment: Portfile-makeicns.diff added

Hi Ryan, here is version 1.4 of makeicns which now uses $(CXX) to build taking into account UsingTheRightCompiler.

comment:1 Changed 11 years ago by mkae (Marko Käning)

Hi Ryan,

is my quick fix accepted?

Greets, Marko

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

Resolution: fixed
Status: newclosed

Sorry, I didn't see your attachment until you posted your comment just now. Trac sends email notification for new comments, but not for new attachments.

If you actually set up the script described in the How to test section of the wiki article, you'll see that even after applying your patch, the error message is still triggered. MacPorts sets the CC, CXX, etc. environment variables only during the configure phase, and since makeicns doesn't have a configure phase, it doesn't see these variables and you have to help it out by manually setting the variables during the build phase, as described in the section on ports with nonexistent configure scripts.

Fixed in r67927.

comment:3 Changed 11 years ago by mkae (Marko Käning)

Ooops, behavior of the configure/build steps seems to be different on different systems... (I did test whether install threw any warning, which it didn't before I submitted my patch.)

Thanks for your help!!!

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

The behavior should be the same on any system, provided you've downloaded the script mentioned at the end of UsingTheRightCompiler and modified the binpath in your macports.conf to point to where it is...

comment:5 Changed 11 years ago by mkae (Marko Käning)

Thanks again, Ryan, no, of course I hadn't tested said thing... Now I did and I got the desired behavior! Building ceased to function with this change. I guess this should be part of a standard MacPorts installation, don't you think? Greets, Marko

comment:6 in reply to:  5 Changed 11 years ago by ryandesign (Ryan Schmidt)

Replying to MK-MacPorts@…:

I guess this should be part of a standard MacPorts installation, don't you think?

Not particularly at this point, since there are sooo many ports that currently don't ensure they're UsingTheRightCompiler, and quite a few ports where I have no idea how to fix it even because their build scripts are so convoluted. I think it's ok to leave this as an option for adventurous people to enable when they feel like finding and fixing stuff that's broken. I myself alternate between having it enabled (when I have time to file lots of tickets) and disabled (when I just want to get the darn ports installed).

Note: See TracTickets for help on using tickets.