Opened 9 years ago

Closed 9 years ago

#40093 closed defect (fixed)

log4cxx doesn't build on ML and XCode 4.3, can't find db-4.6

Reported by: kyle.j.kauffman@… Owned by: mail@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: haspatch Cc: venabled@…, ryandesign (Ryan Schmidt)
Port: log4cxx

Description

log4cxx depends on apr which depends on db46, which installs libdb-4.6.dylib at ${prefix}/lib/db46/. However, this isn't picked up by clang++ during build. Adding

build {
	set env(LIBRARY_PATH) "${prefix}/lib/db46"
	system "cd ${worksrcpath} && make"
}

to the port fixes this (for some reason using build.env with either LDFLAGS or LIBRARY_PATH didn't work, nor did setting these in pre-build and leaving build to default. Being somewhat new to macports, is there a reason for this?).

Here's the relevant part of the log:

:info:build /usr/bin/clang++ -r -keep_private_externs -nostdlib -o .libs/liblog4cxx.10.0.0.dylib-master.o  .libs/action.o .libs/appenderattachableimpl.o .libs/appenderskeleton.o .libs/aprinitializer.o .libs/asyncappender.o .libs/basicconfigurator.o .libs/bufferedwriter.o .libs/bytearrayinputstream.o .libs/bytearrayoutputstream.o .libs/bytebuffer.o .libs/cacheddateformat.o .libs/charsetdecoder.o .libs/charsetencoder.o .libs/class.o .libs/classnamepatternconverter.o .libs/classregistration.o .libs/condition.o .libs/configurator.o .libs/consoleappender.o .libs/cyclicbuffer.o .libs/dailyrollingfileappender.o .libs/datagrampacket.o .libs/datagramsocket.o .libs/date.o .libs/dateformat.o .libs/datelayout.o .libs/datepatternconverter.o .libs/defaultloggerfactory.o .libs/defaultconfigurator.o .libs/defaultrepositoryselector.o .libs/domconfigurator.o .libs/exception.o .libs/fallbackerrorhandler.o .libs/file.o .libs/fileappender.o .libs/filedatepatternconverter.o .libs/fileinputstream.o .libs/filelocationpatternconverter.o .libs/fileoutputstream.o .libs/filerenameaction.o .libs/filewatchdog.o .libs/filter.o .libs/filterbasedtriggeringpolicy.o .libs/fixedwindowrollingpolicy.o .libs/formattinginfo.o .libs/fulllocationpatternconverter.o .libs/gzcompressaction.o .libs/hierarchy.o .libs/htmllayout.o .libs/inetaddress.o .libs/inputstream.o .libs/inputstreamreader.o .libs/integer.o .libs/integerpatternconverter.o .libs/layout.o .libs/level.o .libs/levelmatchfilter.o .libs/levelrangefilter.o .libs/levelpatternconverter.o .libs/linelocationpatternconverter.o .libs/lineseparatorpatternconverter.o .libs/literalpatternconverter.o .libs/loggerpatternconverter.o .libs/loggingeventpatternconverter.o .libs/loader.o .libs/locale.o .libs/locationinfo.o .libs/logger.o .libs/loggingevent.o .libs/loglog.o .libs/logmanager.o .libs/logstream.o .libs/manualtriggeringpolicy.o .libs/messagebuffer.o .libs/messagepatternconverter.o .libs/methodlocationpatternconverter.o .libs/mdc.o .libs/mutex.o .libs/nameabbreviator.o .libs/namepatternconverter.o .libs/ndcpatternconverter.o .libs/ndc.o .libs/nteventlogappender.o .libs/objectimpl.o .libs/objectptr.o .libs/objectoutputstream.o .libs/obsoleterollingfileappender.o .libs/odbcappender.o .libs/onlyonceerrorhandler.o .libs/optionconverter.o .libs/outputdebugstringappender.o .libs/outputstream.o .libs/outputstreamwriter.o .libs/patternconverter.o .libs/patternlayout.o .libs/patternparser.o .libs/pool.o .libs/properties.o .libs/propertiespatternconverter.o .libs/propertyconfigurator.o .libs/propertyresourcebundle.o .libs/propertysetter.o .libs/reader.o .libs/relativetimedateformat.o .libs/relativetimepatternconverter.o .libs/resourcebundle.o .libs/rollingfileappender.o .libs/rollingpolicy.o .libs/rollingpolicybase.o .libs/rolloverdescription.o .libs/rootlogger.o .libs/serversocket.o .libs/simpledateformat.o .libs/simplelayout.o .libs/sizebasedtriggeringpolicy.o .libs/smtpappender.o .libs/socket.o .libs/socketappender.o .libs/socketappenderskeleton.o .libs/sockethubappender.o .libs/socketoutputstream.o .libs/strftimedateformat.o .libs/stringhelper.o .libs/stringmatchfilter.o .libs/stringtokenizer.o .libs/synchronized.o .libs/syslogappender.o .libs/syslogwriter.o .libs/system.o .libs/systemerrwriter.o .libs/systemoutwriter.o .libs/telnetappender.o .libs/threadcxx.o .libs/threadlocal.o .libs/threadspecificdata.o .libs/threadpatternconverter.o .libs/throwableinformationpatternconverter.o .libs/timezone.o .libs/timebasedrollingpolicy.o .libs/transform.o .libs/triggeringpolicy.o .libs/transcoder.o .libs/ttcclayout.o .libs/writer.o .libs/writerappender.o .libs/xmllayout.o .libs/xmlsocketappender.o .libs/zipcompressaction.o
:info:build /usr/bin/clang++ -dynamiclib ${wl}-undefined ${wl}dynamic_lookup -o .libs/liblog4cxx.10.0.0.dylib .libs/liblog4cxx.10.0.0.dylib-master.o  -L/opt/local/lib /opt/local/lib/libaprutil-1.dylib -ldb-4.6 /opt/local/lib/libexpat.dylib /opt/local/lib/libiconv.dylib /opt/local/lib/libapr-1.dylib -lpthread  -arch x86_64 -Wl,-headerpad_max_install_names -arch x86_64 -install_name  /opt/local/lib/liblog4cxx.10.dylib -Wl,-compatibility_version -Wl,11 -Wl,-current_version -Wl,11.0
:info:build ld: library not found for -ldb-4.6

Attachments (1)

main.log (392.0 KB) - added by kyle.j.kauffman@… 9 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Owner: changed from macports-tickets@… to mail@…

In the future, please Cc the port maintainer(s).

comment:2 Changed 9 years ago by larryv (Lawrence Velázquez)

Please undo your change, clean, try again, and attach the complete main.log when it fails.

Changed 9 years ago by kyle.j.kauffman@…

Attachment: main.log added

comment:3 Changed 9 years ago by kyle.j.kauffman@…

Added main log after clean.

comment:4 in reply to:  description Changed 9 years ago by ryandesign (Ryan Schmidt)

Replying to kyle.j.kauffman@…:

log4cxx depends on apr which depends on db46, which installs libdb-4.6.dylib at ${prefix}/lib/db46/. However, this isn't picked up by clang++ during build. Adding

build {
	set env(LIBRARY_PATH) "${prefix}/lib/db46"
	system "cd ${worksrcpath} && make"
}

to the port fixes this (for some reason using build.env with either LDFLAGS or LIBRARY_PATH didn't work, nor did setting these in pre-build and leaving build to default. Being somewhat new to macports, is there a reason for this?).

MacPorts automatically sets LIBRARY_PATH to /opt/local/lib for all ports. It's probably wrong for any port to override this.

-L/opt/local/lib/db46 is missing from the invoked compilation command; that's probably all that needs to be added. Not sure why log4cxx's build system didn't know to do this already.

Please confirm your Xcode version. The log confirms you are running OS X 10.8.4, but the minimum version of Xcode that works on Mountain Lion is 4.4, so I don't think you can be running 4.3. The recommended version of Xcode is the latest, which is 4.6.3.

comment:5 Changed 9 years ago by kyle.j.kauffman@…

Sorry, I meant Xcode 4.6.3.

comment:6 in reply to:  5 ; Changed 9 years ago by venabled@…

Also doesn't build on 10.9 even with Kyle's patch.

comment:7 in reply to:  6 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: venabled@… added
Keywords: haspatch added

Replying to venabled@…:

Also doesn't build on 10.9 even with Kyle's patch.

That's a different problem. See #41604.

comment:8 in reply to:  description Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: ryandesign@… added
Resolution: fixed
Status: newclosed

Replying to kyle.j.kauffman@…:

:info:build ld: library not found for -ldb-4.6

Fixed in r114180 (maintainer timeout).

Note: See TracTickets for help on using tickets.