Problem installing UnitTest++

Ryan Schmidt ryandesign at macports.org
Wed Oct 7 06:00:04 PDT 2009


On Oct 7, 2009, at 06:21, Daniel Lidström wrote:

> I stumbled upon a problem when trying to install UnitTest++:
>
> daniel-lidstroms-imac-g5:/Users/daniel/programming/othello> sudo  
> port install unittest-cpp
> --->  Computing dependencies for unittest-cpp
> --->  Fetching unittest-cpp
> --->  Verifying checksum(s) for unittest-cpp
> --->  Extracting unittest-cpp
> --->  Configuring unittest-cpp
> --->  Building unittest-cpp
> Error: Target org.macports.build returned: shell command " cd "/opt/ 
> local/var/macports/build/ 
> _opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_unittest 
> -cpp/work/UnitTest++" && /usr/bin/make -j1 all " returned error 2
> Command output: src/MemoryOutStream.cpp
> src/DeferredTestReporter.cpp
> src/DeferredTestResult.cpp
> src/XmlTestReporter.cpp
> src/CurrentTest.cpp
> src/Posix/SignalTranslator.cpp
> src/Posix/TimeHelpers.cpp
> Creating libUnitTest++.a library...
> src/tests/Main.cpp
> src/tests/TestAssertHandler.cpp
> src/tests/TestChecks.cpp
> src/tests/TestUnitTest++.cpp
> src/tests/TestTest.cpp
> src/tests/TestTestResults.cpp
> src/tests/TestTestRunner.cpp
> src/tests/TestCheckMacros.cpp
> src/tests/TestTestList.cpp
> src/tests/TestTestMacros.cpp
> src/tests/TestTimeConstraint.cpp
> src/tests/TestTimeConstraintMacro.cpp
> src/tests/TestMemoryOutStream.cpp
> src/tests/TestDeferredTestReporter.cpp
> src/tests/TestXmlTestReporter.cpp
> src/tests/TestCurrentTest.cpp
> Linking TestUnitTest++...
> Running unit tests...
> :107: error: Failure in test: Expected 2 but was 0
> FAILURE: 1 out of 174 tests failed (1 failures).
> Test time: 0.11 seconds.
> make: *** [TestUnitTest++] Error 1
>
> Error: Status 1 encountered during processing.
> daniel-lidstroms-imac-g5:/Users/daniel/programming/othello> find / 
> opt -name libUnitTest++.a
> /opt/local/var/macports/build/ 
> _opt_local_var_macports_sources_rsync.macports.org_release_ports_devel_unittest 
> -cpp/work/UnitTest++/libUnitTest++.a
>
> Can I just copy libUnitTest++.a into /op/local/lib in the meantime?

That might not be a good idea. Installing software by hand into the  
MacPorts prefix will cause a conflict if you later try again to  
install unittest-cpp (or try to install a port that depends on it)  
because the file will already exist but MacPorts won't know where it  
came from. And presumably the tests verify the software functions  
correctly, so a failing test may indicate the software will not work  
correctly. You should file an issue in our issue tracker to report  
this problem, and/or speak with the developers of this software.


I see one other report of this problem, for Debian, here:

http://osdir.com/ml/debian-bugs-rc/2009-04/msg02036.html

Unfortunately I don't see any discussion or solution presented.


The port installs fine for me on Leopard and Snow Leopard, both on a  
MacBook Pro.



More information about the macports-users mailing list