Installation problems | Problèmes à l'installation
Subscription date : 25 January 2013
Messages : 26
|
Hi there,
I trying to port Cairo-dock 3.1.2 for FreeBSD. I had a little trouble compiling the plugins, there is a way to add -L/usr/local/ to gcc when links the plugins?
Tnx a lot
Max Power |
matttbe, Friday 25 January 2013 à 23:19
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Hello and thank you for this bug report,
What's the error exactly? Can you post here (or on pastebin) all messages produced in your terminal when you try to compile (cmake + make) and install (make install) the dock and its plugins?
Cairo-Dock-Plug-Ins has to be installed in the same directory where you've already installed cairo-dock-core (you need to use the same "prefix" for both projets, e.g. -DCMAKE_INSTALL_PREFIX=/usr and install cairo-dock-core before its plugins) |
Guest, Saturday 26 January 2013 à 14:02
|
|
|
Thanks for the reply matttbe,
this is my output http://pastebin.com/pCLa9YRD. Seems it doesn't found gtk3... When i run pkgconf --libs gtk+-3.0 the output is:
-lgtk-3 -lgdk-3 -lpangocairo-1.0 -lXext -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lXdamage -lXfixes -lX11 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lgthread-2.0 -lgmodule-2.0 -pthread -lglib-2.0 -lfreetype -L/usr/local/lib -lfontconfig
so I tryed to edit /usr/home/marco/temp/cairo-dock/cairo-dock-plugins-3.1.2/build/alsaMixer/src/CMakeFiles/cd-AlsaMixer.dir/link.txt and add -L/usr/local/lib and it compiles (obviously it does not compile the next plugin). So, its a way to add -L/usr/local/lib to all the link.txt?
Tnx
Marco |
Guest, Saturday 26 January 2013 à 14:11
|
|
|
Sorry, I forgot. I have compiled the "core" with: cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local; gmake; gmake install (gmake is the GNU Make in FreeBSD, /usr/local it's the path for third-party applications in freebsd) and it works like a charm with a couple of patches. |
matttbe, Saturday 26 January 2013 à 17:08
|
|
Subscription date : 24 January 2009
Messages : 12573
|
Strange. What's the output of:pkg-config --libs-only-L gldi
pkg-config --libs-only-L gtk+-3.0
echo $PATH
echo $LD_LIBRARY_PATH
Note that you can manually add '/usr/local/lib' in link_directories. E.g. by adding this two lines in the main CMakeFiles.txt: set (PACKAGE_LIBRARY_DIRS "${PACKAGE_LIBRARY_DIRS};/usr/local/lib")
message (">>> PACKAGE_LIBRARY_DIRS: ${PACKAGE_LIBRARY_DIRS}")
Just after: pkg_check_modules ("PACKAGE" REQUIRED "gldi") But it's not the better solution...
it works like a charm with a couple of patches. Which patches are you using? |
Subscription date : 25 January 2013
Messages : 26
|
% pkg-config --libs-only-L gldi
-L/usr/local/lib
% pkg-config --libs-only-L gtk+-3.0
-L/usr/local/lib
% echo $PATH
/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/home/marco/bin
% echo $LD_LIBRARY_PATH
LD_LIBRARY_PATH: Undefined variable.
I tryed your workaround but doesn't works for me, it's strange because the PACKAGE_LIBRARY_DIRS variable seems ok
-- found gldi, version 3.1.2
>>> PACKAGE_LIBRARY_DIRS: /usr/local/lib;/usr/local/lib
-- checking for module 'glib-2.0'
For compile the core I have removed all ld library references (because it's included in the FreeBSD's libc); and RTLD_DEEPBIND does not exist in FreeBSD
% diff -r cairo-dock-3.1.2/ orig/cairo-dock-3.1.2/
diff -r cairo-dock-3.1.2/CMakeLists.txt orig/cairo-dock-3.1.2/CMakeLists.txt
119c119,120
< if (NOT ${HAVE_DLFCN_H})
---
> check_library_exists (dl dlopen "" HAVE_LIBDL)
> if (NOT ${HAVE_LIBDL} OR NOT ${HAVE_DLFCN_H})
Only in cairo-dock-3.1.2/src: config.h
diff -r cairo-dock-3.1.2/src/gldit/CMakeLists.txt orig/cairo-dock-3.1.2/src/gldit/CMakeLists.txt
107c107,108
< implementations)
---
> implementations
> dl)
diff -r cairo-dock-3.1.2/src/gldit/cairo-dock-config.c orig/cairo-dock-3.1.2/src/gldit/cairo-dock-config.c
31c31
< #include <unistd.h>
---
> #include <crypt.h>
diff -r cairo-dock-3.1.2/src/gldit/cairo-dock-module-factory.c orig/cairo-dock-3.1.2/src/gldit/cairo-dock-module-factory.c
86c86
< pCairoDockModule->handle = dlopen (pCairoDockModule->cSoFilePath, RTLD_LAZY | RTLD_LOCAL);
---
> pCairoDockModule->handle = dlopen (pCairoDockModule->cSoFilePath, RTLD_LAZY | RTLD_LOCAL | RTLD_DEEPBIND);
Only in cairo-dock-3.1.2/src/gldit: gldi-config.h
Tnx
Max Power |
matttbe, Saturday 26 January 2013 à 19:04
|
|
Subscription date : 24 January 2009
Messages : 12573
|
@fabounet: has this flag to be optional? (RTLD_DEEPBIND)
I tryed your workaround but doesn't works for me, it's strange because the PACKAGE_LIBRARY_DIRS variable seems ok Yes, it's strange!! (or maybe a bug in CMake?? or you can add: add_definition (-L/usr/local/lib)
And what about defining LD_LIBRARY_PATH variable before? export LD_LIBRARY_PATH=/usr/local/lib |
fabounet, Saturday 26 January 2013 à 19:13
|
|
Subscription date : 30 November 2007
Messages : 17118
|
unfortunately without this flag things will probably not work
this is because the help applet is included in the binary, and all applets have the same functions (init, stop, reload, etc)
there are 2 ways to fix this: move Help into the plug-ins, or rename the functions for this applet to avoid collisions.
I'm thinkking which one is better.
also, hwo can we know that RTLD_DEEPBIND is not available in the libc ? |
matttbe, Sunday 27 January 2013 à 01:00
|
|
Subscription date : 25 January 2013
Messages : 26
|
matttbe :
I tryed your workaround but doesn't works for me, it's strange because the PACKAGE_LIBRARY_DIRS variable seems ok Yes, it's strange!! (or maybe a bug in CMake?? or you can add: add_definition (-L/usr/local/lib)
And what about defining LD_LIBRARY_PATH variable before? export LD_LIBRARY_PATH=/usr/local/lib
I tryed both but without success. BTW I added all -L/usr/local/lib by hand and it compiled but when i try to start the dock crash
% cairo-dock
============================================================================
Cairo-Dock version : 3.1.2
Compiled date : Jan 25 2013 09:54:56
Built with GTK : 3.0
Running with OpenGL: 1
============================================================================
warning : (/home/marco/temp/cairo-dock/cairo-dock-plugins-3.1.2/gvfs-integration/cairo-dock-gio-vfs.c:cairo_dock_gio_vfs_init:55)
VFS Deamon NOT found on DBus !
warning : (/home/marco/temp/cairo-dock/cairo-dock-3.1.2/src/cairo-dock.c:_cairo_dock_intercept_signal:156)
Cairo-Dock has crashed (sig 11).
It will be restarted now.
Feel free to report this bug on glx-dock.org to help improving the dock!
info on the system :
FreeBSD misato 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #23: Tue Dec 25 10:50:40 CET 2012 root@misato:/usr/obj/usr/src/sys/MISATOSHEART amd64
The applet 'Dbus' may be the culpritrestarting with 'cairo-dock -x "Dbus" -w 2 -q 1'...
============================================================================
Cairo-Dock version : 3.1.2
Compiled date : Jan 25 2013 09:54:56
Built with GTK : 3.0
Running with OpenGL: 1
============================================================================
warning : (/home/marco/temp/cairo-dock/cairo-dock-plugins-3.1.2/gvfs-integration/cairo-dock-gio-vfs.c:cairo_dock_gio_vfs_init:55)
VFS Deamon NOT found on DBus !
Segmentation fault (core dumped) |
matttbe, Sunday 27 January 2013 à 15:48
|
|
Subscription date : 24 January 2009
Messages : 12573
|
I tryed both but without success Strange...
Is it maybe possible to recompile the core and plugins to produce more 'verbose' compiling and post here (or on pastebin) all output messages? I guess you can use this command:gmake clean && gmake VERBOSE=1 (can you also re-launch 'cmake' in build directory of 'cairo-dock-core' and post here all output messages? )
BTW I added all -L/usr/local/lib by hand and it compiled but when i try to start the dock crash Do you have this crash without plugins? Is it maybe possible to have a backtrace of this crash (but I guess it's due to a problem with ld )? If you want more details about GDB => ddd |
fabounet, Tuesday 29 January 2013 à 00:28
|
|
Subscription date : 30 November 2007
Messages : 17118
|
again, it will not work without RTLD_DEEPBIND
what you can do at the moment is commenting RTLD_DEEPBIND in gldit/cairo-dock-module-factory.c, commenting cairo_dock_register_help_module in cairo-dock.c, and commenting add_subdirectory (help) in src/CMakeLists.txt (in the core)
re-install the core and then re-compile the plug-ins |
fabounet, Sunday 03 February 2013 à 00:46
|
|
Subscription date : 30 November 2007
Messages : 17118
|
should be good now |
matttbe, Sunday 03 February 2013 à 01:49
|
|
Subscription date : 24 January 2009
Messages : 12573
|
(On BZR ) |
Subscription date : 25 January 2013
Messages : 26
|
Hi,
I'm sorry, but the last week I was busy with my uncle's PC (windows 7 :'-|, it makes me mad). Today I going to install FreeBSD on an unused HD for testing cairo-dock 3 (and some others things).
Thanks for replays, I will try your commits ASAP.
fabounet : should be good now
matttbe : (On BZR )
Should I to re-download the tars?
Max Power |
fabounet, Monday 04 February 2013 à 12:33
|
|
Subscription date : 30 November 2007
Messages : 17118
|
since you are compiling, you just need to get the latest revision from bzr (currently 1373) |
matttbe, Monday 04 February 2013 à 16:03
|
|
Subscription date : 24 January 2009
Messages : 12573
|
About Bzr: From BZR (it's a VCS, a bit like Git, Subversion or Mercurial ) |
Subscription date : 25 January 2013
Messages : 26
|
Great work guys! I finally do it!
This is the patch for the core
diff -r cairo-dock-core/CMakeLists.txt orig/cairo-dock-core/CMakeLists.txt
1c1
< ########### requirements #####NOT HAVE_DLFCN_H##########
---
> ########### requirements ###############
143,144c143,144
< #check_library_exists (dl dlopen "" HAVE_LIBDL)
< if (NOT HAVE_DLFCN_H)
---
> check_library_exists (dl dlopen "" HAVE_LIBDL)
> if (NOT HAVE_LIBDL OR NOT HAVE_DLFCN_H)
178c178
< #add_subdirectory (Help)
---
> add_subdirectory (Help)
189c189
< install (FILES ${CMAKE_CURRENT_BINARY_DIR}/cairo-dock.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
---
> install (FILES ${CMAKE_CURRENT_BINARY_DIR}/cairo-dock.pc DESTINATION ${libdir}/pkgconfig)
Only in cairo-dock-core/: build
Only in cairo-dock-core/src: config.h
diff -r cairo-dock-core/src/gldit/CMakeLists.txt orig/cairo-dock-core/src/gldit/CMakeLists.txt
110c110,111
< implementations)
---
> implementations
> dl)
114c115
< install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gldi.pc DESTINATION ${CMAKE_INSTALL_PREFIX}/libdata/pkgconfig)
---
> install (FILES ${CMAKE_CURRENT_BINARY_DIR}/gldi.pc DESTINATION ${libdir}/pkgconfig)
diff -r cairo-dock-core/src/gldit/cairo-dock-config.c orig/cairo-dock-core/src/gldit/cairo-dock-config.c
31c31
< #include <unistd.h>
---
> #include <crypt.h>
Only in cairo-dock-core/src/gldit: gldi-config.h
I changed the destination of *.pc files, because FreeBSD stores this files in $PATH/libdata/pkgconfig instead of $PATH/lib/pkgconfig.
For the plugins i used this:
diff -r cairo-dock-plug-ins/CMakeLists.txt orig/cairo-dock-plug-ins/CMakeLists.txt
738c738
< # add_subdirectory ("gnome-integration")
---
> add_subdirectory ("gnome-integration")
1155c1155
< #add_subdirectory (shortcuts)
---
> add_subdirectory (shortcuts)
1351c1351
< #add_subdirectory (tomboy)
---
> add_subdirectory (tomboy)
1425c1425
< # add_subdirectory ("xfce-integration")
---
> add_subdirectory ("xfce-integration")
Only in cairo-dock-plug-ins/: build
I removed gnome-integration, xfce-integration, tomboy and shortcuts because they don't compile (I think shortcuts uses a Linux-only library), but all the others seem to work.
I still have the CMake issue, I workaround it using this script:
for filefind in $(find . -name link.txt);
do
if (grep gcc $filefind) then
cat $filefind | awk '{print $0 " -L/usr/local/lib"}' > tempfile.txt
mv tempfile.txt $filefind
fi
done
I going to ask to the FreeBSD Forum if they can solve this issue.
Let me know when you create the tarball with the BZR sources, so I can create the port.
Thanks a lot
Max Power |
fabounet, Thursday 14 February 2013 à 23:12
|
|
Subscription date : 30 November 2007
Messages : 17118
|
I think shortcuts uses a Linux-only library
it would be good to fix that point too.
Can you give us more details on the problem ?
about .pc files, we could make the installed path customizable I guess |
Subscription date : 25 January 2013
Messages : 26
|
fabounet : I think shortcuts uses a Linux-only library
it would be good to fix that point too.
Can you give us more details on the problem ?
about .pc files, we could make the installed path customizable I guess
It's mntent.h, I think the equivalent for FreeBSD is http://www.freebsd.org/cgi/man.cgi?query=getmntinfo&apropos=0&sektion=0&manpath=FreeBSD+8.2-RELEASE&format=html. This the error
[ 70%] Built target cd-rssreader [ 71%] Built target cd-Screenshot [ 72%] Building C object shortcuts/src/CMakeFiles/cd-shortcuts.dir/applet-disk-usage.c.o /home/marco/temp/cairo-dock-plug-ins/shortcuts/src/applet-disk-usage.c:21:20: fatal error: mntent.h: No such file or directory compilation terminated. gmake[2]: *** [shortcuts/src/CMakeFiles/cd-shortcuts.dir/applet-disk-usage.c.o] Error 1 gmake[1]: *** [shortcuts/src/CMakeFiles/cd-shortcuts.dir/all] Error 2 gmake: *** [all] Error 2 .
Btw, I finally solve the cmake issues, I used an old version of gcc.
Thanks
I found a solution on freebsd ports http://svnweb.freebsd.org/ports/head/deskutils/cairo-dock-plugins/files/patch-shortcuts?revision=300896&view=markup |
Installation problems | Problèmes à l'installation
|