caryll / otfcc

Optimized OpenType builder and inspector.
Apache License 2.0
422 stars 63 forks source link

[Help] Issues compiling on latest Ubuntu #7

Closed eiszfuchs closed 8 years ago

eiszfuchs commented 8 years ago

I was hoping you could help me with this.

I was trying to compile https://github.com/be5invis/Iosevka by myself but I fail at compiling otfcc for it, as I'm not exactly keen with compilers and environments. There were other errors before, which I was able to solve by installing libc6-dev-i386.

==== Building otfccdump (debug_x32) ====
Creating obj/x32/Debug/otfccdump
otfccdump.c
../../src/cli/otfccdump.c: In function ‘main’:
../../src/cli/otfccdump.c:55:7: warning: variable ‘no_bom’ set but not used [-Wunused-but-set-variable]
  bool no_bom = false;
       ^
stopwatch.c
Linking otfccdump
bin/x32/Debug/liblibotfcc-tables.a(glyf.o): In function `coord_to_json':
/home/dev/otfcc/build/gmake/../../src/tables/glyf.c:356: undefined reference to `roundf'
bin/x32/Debug/libexternals.a(json-builder.o): In function `json_measure_ex':
/home/dev/otfcc/build/gmake/../../dep/extern/json-builder.c:672: undefined reference to `floor'
collect2: error: ld returned 1 exit status
otfccdump.make:138: recipe for target '../../bin/Debug-x32/otfccdump' failed
make[1]: *** [../../bin/Debug-x32/otfccdump] Error 1
Makefile:98: recipe for target 'otfccdump' failed
make: *** [otfccdump] Error 2

Running 16.04 LTS (Xenial), uname -a is:

Linux dev-vm 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
be5invis commented 8 years ago

Looks like missing lm when linking.

be5invis commented 8 years ago

Is it working now? (using the latest [master]) ps. if you are using x64 Linux, maybe you can simply type make linux-release-x64 in the repository directory.

be5invis commented 8 years ago

@eiszfuchs Is the latest version works? I mean, the latest source in master branch.

eiszfuchs commented 8 years ago

Sorry the delay! Yes, this seems to work now after a pull! Thank you!

==== Building otfccdump (debug_x32) ====
otfccdump.c
../../src/cli/otfccdump.c: In function ‘main’:
../../src/cli/otfccdump.c:56:7: warning: variable ‘no_bom’ set but not used [-Wunused-but-set-variable]
  bool no_bom = false;
       ^
Linking otfccdump
==== Building otfccbuild (debug_x32) ====
Creating obj/x32/Debug/otfccbuild
otfccbuild.c
stopwatch.c
Linking otfccbuild

dev@dev-vm:~/otfcc/bin/Debug-x32$ ./otfccbuild --version
This is otfccbuild, version 0.1.5.
dev@dev-vm:~/otfcc/bin/Debug-x32$ ls -l
total 1612
-rwxrwxr-x 1 dev dev 926372 Apr 29 12:18 otfccbuild
-rwxrwxr-x 1 dev dev 711684 Apr 29 12:18 otfccdump

Calling make linux-release-x64 worked, too (but it had more warnings passing by while building). That's much easier than the steps in the README. :beers:

dev@dev-vm:~/otfcc/bin/Release-x64$ ls -l
total 656
-rwxrwxr-x 1 dev dev 349696 Apr 29 12:24 otfccbuild
-rwxrwxr-x 1 dev dev 316896 Apr 29 12:24 otfccdump
be5invis commented 8 years ago

OK, closed.