nikp123 / xava

X11 Audio Visualizer for ALSA
http://nikp123.github.io/xava
Other
133 stars 15 forks source link

Makefile error (Ubuntu 20.04.2) #39

Closed shivanshu-semwal closed 3 years ago

shivanshu-semwal commented 3 years ago

Here is what is did

sudo apt-get install libfftw3-dev libasound2-dev libpulse-dev libx11-dev libsdl2-dev libportaudio2 cmake git wayland-protocols
git clone https://github.com/nikp123/xava.git
cd xava
mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make -j$(nproc)

Here is where it fails

/usr/bin/ld: libiniparser.a(iniparser.c.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/out_wayland.dir/build.make:235: out_wayland.so] Error 1
make[1]: *** [CMakeFiles/Makefile2:125: CMakeFiles/out_wayland.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
nikp123 commented 3 years ago

Yeah it seems that my wild editing broke the master branch as well. Well, feeling risky and merging unstable which has that fix. Try the fix and have fun

shivanshu-semwal commented 3 years ago

It's another error now,

[WARN] xavaFindAndCheckFile at src/shared/io.c:170 - The current system does not support XDG_CONFIG_HOME.
There is a high likelyhood that something may be broken
at /home/antihero/Software/source/xava/build/libxava-shared.so(xavaFindAndCheckFile+0x521) [0x7fb24d6dac51]
at ./xava(+0x4253) [0x5614d59c6253]
at ./xava(+0x26d7) [0x5614d59c46d7]
at /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb24d3740b3]
at ./xava(+0x2dee) [0x5614d59c4dee]
[WARN] xavaFindAndCheckFile at src/shared/io.c:320 - File '/home/antihero/.config/xava/config' does not exist! Trying to make a new one...
at /home/antihero/Software/source/xava/build/libxava-shared.so(xavaFindAndCheckFile+0x3f4) [0x7fb24d6dab24]
at ./xava(+0x4253) [0x5614d59c6253]
at ./xava(+0x26d7) [0x5614d59c46d7]
at /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb24d3740b3]
at ./xava(+0x2dee) [0x5614d59c4dee]
[ERROR] xavaFindAndCheckFile at src/shared/io.c:411 - Could not open '/usr/local/share/xava/config.example' for reading!
at /home/antihero/Software/source/xava/build/libxava-shared.so(xavaFindAndCheckFile+0x3b2) [0x7fb24d6daae2]
at /home/antihero/Software/source/xava/build/libxava-shared.so(xavaFindAndCheckFile+0x43a) [0x7fb24d6dab6a]
at ./xava(+0x4253) [0x5614d59c6253]
at ./xava(+0x26d7) [0x5614d59c46d7]
at /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb24d3740b3]
at ./xava(+0x2dee) [0x5614d59c4dee]
[ERROR] xavaFindAndCheckFile at src/shared/io.c:330 - Could not find default config file! Bailing out...
at /home/antihero/Software/source/xava/build/libxava-shared.so(xavaFindAndCheckFile+0x64e) [0x7fb24d6dad7e]
at ./xava(+0x4253) [0x5614d59c6253]
at ./xava(+0x26d7) [0x5614d59c46d7]
at /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb24d3740b3]
at ./xava(+0x2dee) [0x5614d59c4dee]
[ERROR] load_config at src/config.c:174 - Failed to create default config file!
at ./xava(+0x4284) [0x5614d59c6284]
at ./xava(+0x26d7) [0x5614d59c46d7]
at /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3) [0x7fb24d3740b3]
at ./xava(+0x2dee) [0x5614d59c4dee]

I did sudo make install then I got another error,

xava: error while loading shared libraries: libxava-shared.so: cannot open shared object file: No such file or directory
shivanshu-semwal commented 3 years ago

So xava is running from the build directory, I copied the example config. But the installed xava is not running.

nikp123 commented 3 years ago

oh boy, WHY UBUNTU of all distros is giving me this much trouble

Have to investigate further it seems

shivanshu-semwal commented 3 years ago

image It gives some warning on starting, maybe this is related.

nikp123 commented 3 years ago

Yeah, that shouldn't occur. Are you running in a special environment (like some custom built thing)?

shivanshu-semwal commented 3 years ago

No, no virtual environment.

nikp123 commented 3 years ago

As a workaround, I'd suggest you run the local version of ./xava from the build directory and seeing what it says.

nikp123 commented 3 years ago

oh wait, you already are

shivanshu-semwal commented 3 years ago

So I think I may create a soft link of build one to the bin one. I tried bash shell with it still give that error, image

nikp123 commented 3 years ago

Also, I can bet my butt Ubuntu is not loading libraries from /usr/local/lib (which is a distro problem)

Try rebuilding xava with -CMAKE_INSTALL_PREFIX=/usr in the CMake args.

nikp123 commented 3 years ago

So I think I may create a soft link of build one to the bin one.

Don't do that

shivanshu-semwal commented 3 years ago

I did this,

cmake .. -DCMAKE_BUILD_TYPE=Release -CMAKE_INSTALL_PREFIX=/usr

I get this error at end,

-- iniparser not found on system, building from source.
Submodule 'lib/iniparser' (https://github.com/ndevilla/iniparser) registered for path '../lib/iniparser'
Cloning into '/home/antihero/Software/xava/lib/iniparser'...
Submodule path '../lib/iniparser': checked out '7b68537ac11fa62e923fd26aa87e206dc93a9a55'
-- Configuring incomplete, errors occurred!
See also "/home/antihero/Software/xava/build/CMakeFiles/CMakeOutput.log".

Am I running wrong command??

nikp123 commented 3 years ago

Show the entire log, and attach the suggested logfile. You're doing fine, the CMake script isn't.

nikp123 commented 3 years ago

oh wait, it's -DCMAKE_INSTALL_PREFIX=/usr

apologies

shivanshu-semwal commented 3 years ago

Yes that fixed it,

oh boy, WHY UBUNTU of all distros is giving me this much trouble

You can make separate install instructions (int the README.md), for each distro.

Thanks for helping me. 🙂