*/}}

#1 undefined reference to `roundf64'

Suljettu
2 vuotta sitten avasi sdomi · 3 kommenttia
sdomi kommentoitu 2 vuotta sitten

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 kommentoitu 2 vuotta sitten
Omistaja

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 kommentoitu 2 vuotta sitten
Tekijä

It links after changing it to round, thanks!

It links after changing it to `round`, thanks!
chengdulittlea kommentoitu 2 vuotta sitten
Omistaja

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

This should be fixed with `0abf6a3437`, see if it's okay :D
Kirjaudu sisään osallistuaksesi tähän keskusteluun.
Ei tunnistetta
Ei merkkipaalua
Ei osoitettua
2 osallistujaa
Ladataan...
Peruuta
Tallenna
Sisältöä ei vielä ole.