← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 362878] Re: fix compilation on Mac OS X

 

Fixed in version 0.760.

** Changed in: dcplusplus
       Status: Fix Committed => Fix Released

-- 
fix compilation on Mac OS X
https://bugs.launchpad.net/bugs/362878
You received this bug notification because you are a member of LinuxDC++
Team, which is subscribed to LinuxDC++.

Status in DC++: Fix Released
Status in Linux DC++: Fix Committed

Bug description:
linuxdcpp does not compile on Mac OS X (MacPorts with a custom Portfile, which can be supplied on demand):

dcpp/QueueManager.cpp: In static member function 'static std::string dcpp::QueueManager::checkTarget(const std::string&, int64_t)':
dcpp/QueueManager.cpp:508: error: 'PATH_MAX' was not declared in this scope
scons: *** [build/dcpp/QueueManager.o] Error 1
scons: building terminated because of errors.

this is due to limits.h not defining PATH_MAX in Mac OS X; sys/syslimits.h is used instead.

when this is fixed (see patch), this error occurs:

g++ -o linuxdcpp -L/usr/lib -Wl,-framework,CoreServices,-framework,ApplicationServices build/dcpp/libdcpp.a build/gui/bookentry.o build/gui/dialogentry.o build/gui/downloadqueue.o build/gui/entry.o build/gui/favoritehubs.o build/gui/finishedtransfers.o build/gui/hashdialog.o build/gui/hub.o build/gui/mainwindow.o build/gui/privatemessage.o build/gui/publichubs.o build/gui/search.o build/gui/settingsdialog.o build/gui/settingsmanager.o build/gui/sharebrowser.o build/gui/treeview.o build/gui/UserCommandMenu.o build/gui/wulfor.o build/gui/wulformanager.o build/gui/WulforUtil.o -L/opt/local/lib -L/usr/X11/lib -Lbuild/dcpp -Ldcpp -ldcpp -lbz2 -lcrypto -lssl -lglade-2.0 -lgtk-x11-2.0 -lxml2 -lpthread -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangocairo-1.0 -lcairo -lSM -lICE -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lgmodule-2.0 -lfreetype -lz -lfontconfig -lexpat -lpng12 -lXrender -lX11 -lpixman-1 -lgthread-2.0 -lglib-2.0 -lintl -liconv
Undefined symbols:
  "_RSA_generate_key_ex", referenced from:
      dcpp::CryptoManager::generateCertificate()      in libdcpp.a(CryptoManager.o)
ld: symbol(s) not found
collect2: ld returned 1 exit status
scons: *** [linuxdcpp] Error 1

this is due to a redundant library path being supplied in SConstruct. it "locks" the build to use the standard system libraries rather than the compiler-chosen ones. for a non-default (non-system) compiler (eg. MacPorts gcc), the latter is necessary.

when the entire patch is applied, the compile succeeds.