4
How do I force MacPorts to rebuild a specific port? I manually made a change to a MacPorts makefile to link in a specific library, but the missing symbol still cannot be found. Perhaps I need to rebuild, but how do I accomplish that without cleaning out the port (which deletes the file I modified)?
Motivation
Using MacPorts, I'm trying to install Qt (i.e., the qt4-mac-devel
port) in Mac OS X Mountain Lion,
but it fails with an undefined symbol (_objc_msgSend_fixup
). A MacPorts ticket with a similar problem
led me to inspect the offending QtWebKit.pro
file under:
QT4_SRC=/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_aqua_qt4-mac-devel/qt4-mac-devel/work/qt-everywhere-opensource-src-4.8.0/src/3rdparty/webkit/Source/WebKit/qt/
The else
predicate on line 254 checks for Darwin 11 or the 10.7 SDK (both of which are in Lion and unavailable in Mountain Lion).
There is no predicate in the if-else
list for Mountain Lion's WebKit.
254: } else: equals(DARWIN_MAJOR_VERSION, "11") | contains(QMAKE_MAC_SDK, "/Developer/SDKs/MacOSX10.7.sdk") {
255: LIBS += $$SOURCE_DIR/../WebKitLibraries/libWebKitSystemInterfaceLion.a
256: }
257:}
As a dirty quick fix, I changed line 254 to be an unconditional else
. When I try to test this by re-running the port install
command, I see the same original error. I'm pretty sure MacPorts is not even looking at my change because I reran the command after entering garbage text into the file and renaming the file. So, I'm now looking for a way to force the rebuild.
Things I've tried
- Rebuild with the
-s
flag (to rebuild from source):sudo port install -s qt4-mac-devel
- Rebuild after touching all Qt source files:
find ${QT4_SRC} -name "*.cpp" -exec touch {} \;
- Clean the port and then rebuild (no go...
port clean
deletes theQtWebKit.pro
file, which contains my necessary changes)
Any suggestions? Thanks.
Possible duplicate of Stack Overflow question http://stackoverflow.com/questions/10690159/sneaky-patching-source-with-macports/11907135
– Vortexfive – 2012-08-20T11:11:49.813