Opened 9 years ago

Closed 9 years ago

#29789 closed defect (worksforme)

debug variant of kdelibs4 port is not debuggable

Reported by: mkae (Marko Käning) Owned by: nerdling (Jeremy Lavergne)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc: sharky@…, michaelld (Michael Dickens)
Port: kdelibs4

Description

Would be really cool to have a debug variant of this port!

Change History (5)

comment:1 Changed 9 years ago by mkae (Marko Käning)

Summary: debug variant of kdelibs4 portdebug variant of kdelibs4 port is not debuggable

I realized that it is easy enough to implement by simply adding

variant debug description "Enable debug." {
    configure.args-append  -DCMAKE_BUILD_TYPE=Debugfull
}

But for some reason I was still unable to step into the libraries with gdb/Xcode. :-(

I did set the environment variable:

DYLD_IMAGE_SUFFIX=_debug

Any hints what could have gone wrong?

comment:2 Changed 9 years ago by jmroot (Joshua Root)

The cmake portgroup already defines a debug variant, but capitalises "debugFull" differently.

comment:3 Changed 9 years ago by mkae (Marko Käning)

Thanks jmr for the hint. I'll try to rebuild kdelibs4 in that variant now. Hope that fixes the debugging issue I keep having.

comment:4 Changed 9 years ago by mkae (Marko Käning)

Although the debug variant of mine seems to install fine "port contents" eventually doesn't show any *_debug-libraries as the result. It looks like the port does not

[ MP-devel ] :kdelibs4 marko$ sudo port install +debug
--->  Computing dependencies for kdelibs4
--->  Fetching kdelibs4
--->  Verifying checksum(s) for kdelibs4
--->  Extracting kdelibs4
--->  Applying patches to kdelibs4
--->  Configuring kdelibs4
--->  Building kdelibs4
--->  Staging kdelibs4 into destroot
--->  Installing kdelibs4 @4.6.3_3+debug
--->  Deactivating kdelibs4 @4.6.3_2
--->  Cleaning kdelibs4
--->  Activating kdelibs4 @4.6.3_3+debug
##########################################################
# Don't forget that dbus needs to be started as the local 
# user (not with sudo) before any KDE programs will launch
# To start it run the following command:                  
# launchctl load /Library/LaunchAgents/org.freedesktop.dbus-session.plist
##########################################################
 
######################################################
#  Programs will not start until you run the command 
#  'sudo chown -R $USER ~/Library/Preferences/KDE'  
#  replacing $USER with your username.              
######################################################
--->  Cleaning kdelibs4
[ MP-devel ] :kdelibs4 marko$ port contents kdelibs4 | grep debug
  /opt/macports-test/include/kdebug.h
  /opt/macports-test/share/apps/cmake/modules/KDELibs4LibraryTargets-debugfull.cmake
  /opt/macports-test/share/apps/cmake/modules/KDELibs4ToolsTargets-debugfull.cmake
  /opt/macports-test/share/apps/katepart/syntax/xmldebug.xml
  /opt/macports-test/share/config/kdebug.areas
  /opt/macports-test/share/config/kdebugrc

/opt/macports-test/share/apps/cmake/modules/KDELibs4LibraryTargets-debugfull.cmake, however, seem to say that the debug versions of the libraries don't have the "_debug" suffix anyway:

# Import target "KDE4__kdecore" for configuration "Debugfull"
SET_PROPERTY(TARGET KDE4__kdecore APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUGFULL)
SET_TARGET_PROPERTIES(KDE4__kdecore PROPERTIES
  IMPORTED_LINK_INTERFACE_LIBRARIES_DEBUGFULL "Qt4::QtDBus;Qt4::QtCore;-lpthread;-framework Carbon"
  IMPORTED_LOCATION_DEBUGFULL "/opt/macports-test/lib/libkdecore.5.6.0.dylib"
  IMPORTED_SONAME_DEBUGFULL "libkdecore.5.dylib"
  )

...or, do I misunderstand this?

comment:5 Changed 9 years ago by mkae (Marko Käning)

Resolution: worksforme
Status: newclosed

Well, eventually I am able to debug into KDE's libs. (With my debug-variant from above. Didn't test the +debugFull variant again.)

Note: See TracTickets for help on using tickets.