Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#28270 closed defect (fixed)

ipe doesn't ensure it's UsingTheRightCompiler

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: m.thon@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: ipe

Description

ipe doesn't ensure it's UsingTheRightCompiler:

--->  Building ipe
DEBUG: build phase started at Thu Feb  3 14:30:03 CST 2011
DEBUG: Executing org.macports.build (ipe)
DEBUG: port disallows a parallel build
DEBUG: Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_ipe/work/.CC_PRINT_OPTIONS' QTDIR='/opt/local' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6' MOC='/opt/local/bin/moc' QMAKE='/opt/local/bin/qmake'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_ipe/work/ipe-7.0.13/src" && /usr/bin/make all IPEPREFIX=/opt/local MOC=/opt/local/bin/moc'
/usr/bin/make --directory=ipelib all
mkdir -p ../../build/obj/ipelib; echo "" > ../../build/obj/ipelib/depend.mak; for f in ipebase.cpp ipeplatform.cpp ipegeo.cpp ipexml.cpp ipeattributes.cpp ipebitmap.cpp ipedct.cpp ipeshape.cpp ipegroup.cpp ipeimage.cpp ipetext.cpp ipepath.cpp ipereference.cpp ipeobject.cpp ipefactory.cpp ipestdstyles.cpp ipeiml.cpp ipepage.cpp ipepainter.cpp ipepdfparser.cpp ipepdfwriter.cpp ipepswriter.cpp ipestyle.cpp ipesnap.cpp ipeutils.cpp ipelatex.cpp ipedoc.cpp; do g++ -MM -MT ../../build/obj/ipelib/${f%%.cpp}.o -I../include   -DIPEFONTMAP=\"/opt/local/share/ipe/7.0.13/fontmap.xml\"    $f >> ../../build/obj/ipelib/depend.mak; done
g++ -MM -MT ../../build/obj/ipelib/ipebase.o -I../include -DIPEFONTMAP="/opt/local/share/ipe/7.0.13/fontmap.xml" ipebase.cpp
g++: Error: You should be using ${configure.cxx}
See http://trac.macports.org/wiki/UsingTheRightCompiler
g++ -MM -MT ../../build/obj/ipelib/ipeplatform.o -I../include -DIPEFONTMAP="/opt/local/share/ipe/7.0.13/fontmap.xml" ipeplatform.cpp
g++: Error: You should be using ${configure.cxx}
See http://trac.macports.org/wiki/UsingTheRightCompiler
g++ -MM -MT ../../build/obj/ipelib/ipegeo.o -I../include -DIPEFONTMAP="/opt/local/share/ipe/7.0.13/fontmap.xml" ipegeo.cpp
g++: Error: You should be using ${configure.cxx}
See http://trac.macports.org/wiki/UsingTheRightCompiler
[snip]

Attachments (1)

Portfile-ipe.diff (686 bytes) - added by m.thon@… 14 years ago.

Download all attachments as: .zip

Change History (5)

Changed 14 years ago by m.thon@…

Attachment: Portfile-ipe.diff added

comment:1 Changed 14 years ago by m.thon@…

Ok, I see the point, and attach a Portfile patch that should resolve this.

comment:2 Changed 14 years ago by m.thon@…

This is fixed in the next version update #28428. So please disregard this ticket.

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

Resolution: fixed
Status: newclosed

I'll still commit this separately.

I see this patch not only uses the right compiler, but also tries to use the right build_arch. That's a good idea, but the patch doesn't accomplish the second goal. I see you're passing the arch flags into CXXFLAGS and LDFLAGS, but the ipe software doesn't seem to be making use of it. The problem was trying to append to these variables using "+="; I fixed it using just "=".

Note also that the correct archflags variable to pass to LDFLAGS is not cc_archflags but ld_archflags. Doesn't make much difference -- I think they have the same contents -- but we may as well use the variables the way they were intended.

r76016

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

Actually, adding those default CXXFLAGS and LDFLAGS has caused problems when upgrading; for example, trying to upgrade the port from 7.0.13 to 7.0.14 I now get...

DEBUG: Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_ipe/work/.CC_PRINT_OPTIONS' CXXFLAGS='-O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6' LDFLAGS='-L/opt/local/lib -arch x86_64'
DEBUG: Assembled command: 'cd "/opt/local/var/macports/build/_Users_rschmidt_macports_dports_graphics_ipe/work/ipe-7.0.14/src" && /usr/bin/make all IPEPREFIX=/opt/local MOC=/opt/local/bin/moc CXX=/usr/bin/g++-4.2'
/usr/bin/make --directory=ipelib all
mkdir -p ../../build/obj/ipelib; echo "" > ../../build/obj/ipelib/depend.mak; for f in ipebase.cpp ipeplatform.cpp ipegeo.cpp ipexml.cpp ipeattributes.cpp ipebitmap.cpp ipedct.cpp ipeshape.cpp ipegroup.cpp ipeimage.cpp ipetext.cpp ipepath.cpp ipereference.cpp ipeobject.cpp ipefactory.cpp ipestdstyles.cpp ipeiml.cpp ipepage.cpp ipepainter.cpp ipepdfparser.cpp ipepdfwriter.cpp ipepswriter.cpp ipestyle.cpp ipesnap.cpp ipeutils.cpp ipelatex.cpp ipedoc.cpp; do /usr/bin/g++-4.2 -MM -MT ../../build/obj/ipelib/${f%%.cpp}.o -I/opt/local/include -I../include   -DIPEFONTMAP=\"/opt/local/share/ipe/7.0.14/fontmap.xml\"    $f >> ../../build/obj/ipelib/depend.mak; done
Compiling ipebase.cpp...
/usr/bin/g++-4.2 -O2 -arch x86_64 -Wall -g -O2 -fPIC -I/opt/local/include -I../include   -DIPEFONTMAP=\"/opt/local/share/ipe/7.0.14/fontmap.xml\"     -c -o ../../build/obj/ipelib/ipebase.o ipebase.cpp
ipebase.cpp:674: error: prototype for 'long int ipe::StringStream::tell() const' does not match any in class 'ipe::StringStream'
/opt/local/include/ipebase.h:291: error: candidate is: virtual int ipe::StringStream::tell() const
ipebase.cpp:674: error: 'long int ipe::StringStream::tell() const' cannot be overloaded
/opt/local/include/ipebase.h:291: error: with 'virtual int ipe::StringStream::tell() const'
ipebase.cpp:715: error: prototype for 'long int ipe::FileStream::tell() const' does not match any in class 'ipe::FileStream'
/opt/local/include/ipebase.h:303: error: candidate is: virtual int ipe::FileStream::tell() const
ipebase.cpp:715: error: 'long int ipe::FileStream::tell() const' cannot be overloaded
/opt/local/include/ipebase.h:303: error: with 'virtual int ipe::FileStream::tell() const'
make[1]: *** [../../build/obj/ipelib/ipebase.o] Error 1

...because some include file has changed in the new version, but -I/opt/local/include is telling it to look at the old version's headers first; if I fix the CXXFLAGS, a similar error occurs later because of the LDFLAGS. So I removed those again with the 7.0.14 update in r76017, and left just the archflags in CXXFLAGS and LDFLAGS. The port already seemed to know where to find the libraries and headers it needs, so there's no need to add that information to CXXFLAGS and LDFLAGS.

Note: See TracTickets for help on using tickets.