marvinkreis / rofi-file-browser-extended

Use rofi to quickly open files
MIT License
240 stars 15 forks source link

Symbol lookup error (g_canonicalize_filename) #15

Closed RaitaroH closed 5 years ago

RaitaroH commented 5 years ago

I saw the recent commit, and I was excited to try it out. Unfortunately I am TERRIBLE at debugging stuff :( I have libglib2.0-0 installed, and it should contain g_canonicalize_filename. I also have libgtk-3-dev installed. Again, I am terrible with dependencies.

▶ cmake .                      
-- The C compiler identification is GNU 7.4.0
-- The CXX compiler identification is GNU 7.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Checking for one of the modules 'glib-2.0'
-- Checking for one of the modules 'cairo'
-- Checking for one of the modules 'gtk+-3.0'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/raitaro/github/rofi-file-browser-extended
▶ make        
Scanning dependencies of target filebrowser
[ 14%] Building C object CMakeFiles/filebrowser.dir/src/filebrowser.c.o
[ 28%] Building C object CMakeFiles/filebrowser.dir/src/files.c.o
[ 42%] Building C object CMakeFiles/filebrowser.dir/src/icons.c.o
[ 57%] Building C object CMakeFiles/filebrowser.dir/src/keys.c.o
[ 71%] Building C object CMakeFiles/filebrowser.dir/src/options.c.o
[ 85%] Building C object CMakeFiles/filebrowser.dir/src/util.c.o
/home/raitaro/github/rofi-file-browser-extended/src/util.c: In function ‘get_existing_abs_path’:
/home/raitaro/github/rofi-file-browser-extended/src/util.c:8:22: warning: implicit declaration of function ‘g_canonicalize_filename’; did you mean ‘g_build_filename’? [-Wimplicit-function-declaration]
char *abs_path = g_canonicalize_filename ( path, current_dir );
^~~~~~~~~~~~~~~~~~~~~~~
g_build_filename
/home/raitaro/github/rofi-file-browser-extended/src/util.c:8:22: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
[100%] Linking C shared library filebrowser.so
[100%] Built target filebrowser
▶ sudo make install                         
[100%] Built target filebrowser
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/lib/rofi/filebrowser.so

A make uninstall would be sweet btw.

Running example command gives following error:

rofi: symbol lookup error: /usr/local/lib/rofi/filebrowser.so: undefined symbol: g_canonicalize_filename
marvinkreis commented 5 years ago

I see. The glib manual states g_canonicalize_filename is available since Version 2.58, but not all distros have received this version yet. I'll change if for the time being.

marvinkreis commented 5 years ago

I pushed a fix to the develop branch. Can you check if it works for you?

RaitaroH commented 5 years ago

Works now thank you.