alefore / edge

Edge - a text editor
GNU General Public License v3.0
77 stars 2 forks source link

Compilation error on Ubuntu 20.04 #4

Closed donquichotte closed 4 years ago

donquichotte commented 4 years ago

Compilation terminates with

/edge/src/audio.cc:125: undefined reference to `ao_play'

On Ubuntu 20.04.

libaowas installed with sudo apt install libao-dev before compiling.

alefore commented 4 years ago

Thank you for letting me know.

That's odd. I think that's an error in the linker phase -- I think a compilation phase error would look different. I guess it means it could successfully find the headers and found the definition in the headers. Maybe -lao is missing from the link command?

If you run make edge, what's the last command it attempts to run? I expect it will be something like: /bin/sh ./libtool --tag=CXX --mode=link g++ -g -O2 -std=c++17 -g -o edge ... -lao -lpthread -lncursesw (including a very long list of .o and .so files). Does it include -lao at the end?

I just pushed a change to head to make libao optional. In the meantime, you could pull from head again, uninstall libao-dev, re-run ./configure (and check that HAS_LIBAO is not defined in config.h), and rebuild. You won't be missing much (just the use of audio for some operations, but... I actually have that disabled most of the time anyway; the use of audio was an experiment I did at some point, which... I guess wasn't very successful)...

Thanks once again!

donquichotte commented 4 years ago

Thank you for the quick response.

Peculiarly enough, the issue disappeared after rebooting the system, although I don't understand why that should make a difference.

Compiling without libao works as well.

I am looking forward to trying out edge, thanks for your work!