sirjuddington / SLADE

It's a Doom editor
https://slade.mancubus.net
GNU General Public License v2.0
710 stars 109 forks source link

slade refuses to compile #452

Closed jjbarr closed 8 years ago

jjbarr commented 8 years ago

Slade refuses to compile on my system. make gives the following error:

/usr/bin/ld: /usr/local/lib/libfreetype.a(autofit.c.o): undefined reference to symbol 'hb_buffer_get_glyph_positions'
/usr/lib/libharfbuzz.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
src/CMakeFiles/slade.dir/build.make:9024: recipe for target 'slade' failed
make[2]: *** [slade] Error 1
CMakeFiles/Makefile2:85: recipe for target 'src/CMakeFiles/slade.dir/all' failed
make[1]: *** [src/CMakeFiles/slade.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2

After doing some research, it looks like a dependency of some kind was unmet, and that's why ld is complaining. I am unsure how or why, not knowing much about the internals of your project.

I am running archlinux, my uname -srvmo is Linux 4.3.3-3-ARCH #1 SMP PREEMPT Wed Jan 20 08:12:23 CET 2016 x86_64 GNU/Linux, and I am running openrc instead of systemd, which is not standard, though probably not relevant. This is especially puzzling, considering that some of you are running Manjaro, which is an arch distro.

eGax commented 8 years ago

I can tell you the PKGBUILDS up on the AUR would not compile for me on Manjaro Linux, failing with a similar message as you received.

Slade from git does manually compile for me though the terminal with:

git clone https://github.com/sirjuddington/SLADE.git slade
mkdir slade/build
cd slade/build
cmake ..
make

My distro build already had all the required dependencies for Slade 3 to compile and run. I'm not sure what's up with the git build recipe on the AUR and wanted to find the issue or at least flag it out of date a few days ago when this happened to me, but never got back to it once I realized it wasn't a Slade issue.

jjbarr commented 8 years ago

The error is consistent, even if the slade sources are fresh from git.

eGax commented 8 years ago

Hmm..ok. I compiled it a few days ago fine. I'll try now to see if there is any change for me as well. Looks to be specific to your freetype library maybe? Looking at your errors with freetype, did you check which version of freetype is installed? If i look in my system for freetype I get this as a result:

screenshot_2016-02-08_15-24-51

If there is something wrong with your installed freetype2 libraries then that would explain your second issue why harfbuzz is failing since it depends of freetype2 to be present and working.

jjbarr commented 8 years ago

No, I'm running the same version of freetype2 you are.

eevee commented 8 years ago

I'm also running Arch and have had no problems.

Is that the only error? There's no other output higher up in the terminal?

Monsterovich commented 8 years ago

/usr/bin/ld: /usr/local/lib/libfreetype.a(autofit.c.o): undefined reference to symbol 'hb_buffer_get_glyph_positions'

This looks like libfreetype depends on something that is missing in your system. This often happens with static libraries. Try to link it with dynamic library.

jjbarr commented 8 years ago

Um... How do you do that?

eevee commented 8 years ago

hb_* is harfbuzz, which I only just realized is an entirely separate package. Do you have it installed?

jjbarr commented 8 years ago

yes, I do. Also, here is the gist of my full build output. I figured it would help. https://gist.github.com/qwertyuiop924/db194c459b5d1072a7d2

eevee commented 8 years ago

That almost seems like -lharfbuzz is just missing entirely from the compiler invocation? I'm not much of a C wizard, though.

jjbarr commented 8 years ago

adding -lharfbuzz to the beginning of the list of libraries to link in the compiler invocation in SLADE/build/src/CMakeFiles/slade.dir/link.txt seemed to work. Now here's a question: Why wasn't it there in the first place, and why haven't huge quantities of people had massive amount of compiler errors because of this yet?