*/}}

#1 undefined reference to `roundf64'

Закриті
1 рік тому відкрито sdomi · 3 коментарів
sdomi відкоментовано 1 рік тому

Hi,

while compiling OurPaint, it fails on linking to LaGUI's la_tns_kernel.c; I couldn't find a reference to roundf64 anywhere online, and I only found calls to it in your code - is this an internal thing of yours, or is it maybe some weird GLEW oddity?

I'm on Alpine x86_64, I compiled LaGUI from source w/o errors. Below is a log of how the compilation crashed:

/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/lagui/liblagui.a(la_tns_kernel.c.o): in function `tnsDraw2DGrid10':
la_tns_kernel.c:(.text+0x16e6a): undefined reference to `roundf64'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x17004): undefined reference to `roundf64'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x17363): undefined reference to `roundf64'
/usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x174fd): undefined reference to `roundf64'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/OurPaint.dir/build.make:200: OurPaint] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/OurPaint.dir/all] Error 2
make: *** [Makefile:91: all] Error 2
Hi, while compiling OurPaint, it fails on linking to LaGUI's `la_tns_kernel.c`; I couldn't find a reference to `roundf64` anywhere online, and I only found calls to it in your code - is this an internal thing of yours, or is it maybe some weird GLEW oddity? I'm on Alpine x86_64, I compiled LaGUI from source w/o errors. Below is a log of how the compilation crashed: ``` /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: /usr/local/lib/lagui/liblagui.a(la_tns_kernel.c.o): in function `tnsDraw2DGrid10': la_tns_kernel.c:(.text+0x16e6a): undefined reference to `roundf64' /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x17004): undefined reference to `roundf64' /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x17363): undefined reference to `roundf64' /usr/lib/gcc/x86_64-alpine-linux-musl/12.2.1/../../../../x86_64-alpine-linux-musl/bin/ld: la_tns_kernel.c:(.text+0x174fd): undefined reference to `roundf64' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/OurPaint.dir/build.make:200: OurPaint] Error 1 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/OurPaint.dir/all] Error 2 make: *** [Makefile:91: all] Error 2 ```
chengdulittlea відкоментовано 1 рік тому
Власник

After some look I find roundf64 might not exist in some lighter libraries like musl libc doesn't have that symbol defined. you can modify the roundf64 into just round to compile for now (I will go fix it in a later version). I checked that function, it's no big deal for that part of code.

After some look I find `roundf64` might not exist in some lighter libraries like `musl libc` doesn't have that symbol defined. you can modify the `roundf64` into just `round` to compile for now (I will go fix it in a later version). I checked that function, it's no big deal for that part of code.
sdomi відкоментовано 1 рік тому
Автор

It links after changing it to round, thanks!

It links after changing it to `round`, thanks!
chengdulittlea відкоментовано 1 рік тому
Власник

This should be fixed with 0abf6a3437, see if it's okay :D

This should be fixed with `0abf6a3437`, see if it's okay :D
Підпишіться щоб приєднатися до обговорення.
Без Мітки
Етап відсутній
Немає відповідального
2 учасників
Завантажується...
Скасувати
Зберегти
Тут ще немає жодного вмісту.