You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to build a Linux version of my app, which first compiles it into a shared library that's loaded from executables. It builds fine on Windows, but I get this error on Linux:
/usr/bin/g++ -m64 -s -Wl,-z,relro -shared -Wl,-z,nodelete -Wl,-Bsymbolic -o a.out -rdynamic -Wl,--compress-debug-sections=zlib /tmp/go-link-3837878212/go.o /tmp/go-link-3837878212/000000.o /tmp/go-link-3837878212/000001.o /tmp/go-link-3837878212/000002.o /tmp/go-link-3837878212/000003.o /tmp/go-link-3837878212/000004.o /tmp/go-link-3837878212/000005.o /tmp/go-link-3837878212/000006.o /tmp/go-link-3837878212/000007.o /tmp/go-link-3837878212/000008.o /tmp/go-link-3837878212/000009.o /tmp/go-link-3837878212/000010.o /tmp/go-link-3837878212/000011.o /tmp/go-link-3837878212/000012.o /tmp/go-link-3837878212/000013.o /tmp/go-link-3837878212/000014.o /tmp/go-link-3837878212/000015.o /tmp/go-link-3837878212/000016.o /tmp/go-link-3837878212/000017.o /tmp/go-link-3837878212/000018.o /tmp/go-link-3837878212/000019.o /tmp/go-link-3837878212/000020.o /tmp/go-link-3837878212/000021.o /tmp/go-link-3837878212/000022.o /tmp/go-link-3837878212/000023.o /tmp/go-link-3837878212/000024.o /tmp/go-link-3837878212/000025.o /tmp/go-link-3837878212/000026.o /tmp/go-link-3837878212/000027.o /tmp/go-link-3837878212/000028.o /tmp/go-link-3837878212/000029.o /tmp/go-link-3837878212/000030.o /tmp/go-link-3837878212/000031.o /tmp/go-link-3837878212/000032.o /tmp/go-link-3837878212/000033.o /tmp/go-link-3837878212/000034.o /tmp/go-link-3837878212/000035.o /tmp/go-link-3837878212/000036.o /tmp/go-link-3837878212/000037.o /tmp/go-link-3837878212/000038.o /tmp/go-link-3837878212/000039.o /tmp/go-link-3837878212/000040.o /tmp/go-link-3837878212/000041.o /tmp/go-link-3837878212/000042.o /tmp/go-link-3837878212/000043.o /tmp/go-link-3837878212/000044.o /tmp/go-link-3837878212/000045.o /tmp/go-link-3837878212/000046.o /tmp/go-link-3837878212/000047.o /tmp/go-link-3837878212/000048.o /tmp/go-link-3837878212/000049.o /tmp/go-link-3837878212/000050.o /tmp/go-link-3837878212/000051.o /tmp/go-link-3837878212/000052.o /tmp/go-link-3837878212/000053.o /tmp/go-link-3837878212/000054.o /tmp/go-link-3837878212/000055.o /tmp/go-link-3837878212/000056.o /tmp/go-link-3837878212/000057.o /tmp/go-link-3837878212/000058.o /tmp/go-link-3837878212/000059.o /tmp/go-link-3837878212/000060.o /tmp/go-link-3837878212/000061.o /tmp/go-link-3837878212/000062.o /tmp/go-link-3837878212/000063.o /tmp/go-link-3837878212/000064.o /tmp/go-link-3837878212/000065.o /tmp/go-link-3837878212/000066.o /tmp/go-link-3837878212/000067.o /tmp/go-link-3837878212/000068.o /tmp/go-link-3837878212/000069.o /tmp/go-link-3837878212/000070.o /tmp/go-link-3837878212/000071.o /tmp/go-link-3837878212/000072.o /tmp/go-link-3837878212/000073.o /tmp/go-link-3837878212/000074.o /tmp/go-link-3837878212/000075.o /tmp/go-link-3837878212/000076.o /tmp/go-link-3837878212/000077.o /tmp/go-link-3837878212/000078.o /tmp/go-link-3837878212/000079.o /tmp/go-link-3837878212/000080.o /tmp/go-link-3837878212/000081.o /tmp/go-link-3837878212/000082.o /tmp/go-link-3837878212/000083.o /tmp/go-link-3837878212/000084.o /tmp/go-link-3837878212/000085.o /tmp/go-link-3837878212/000086.o /tmp/go-link-3837878212/000087.o /tmp/go-link-3837878212/000088.o /tmp/go-link-3837878212/000089.o /tmp/go-link-3837878212/000090.o /tmp/go-link-3837878212/000091.o /tmp/go-link-3837878212/000092.o /tmp/go-link-3837878212/000093.o /tmp/go-link-3837878212/000094.o /tmp/go-link-3837878212/000095.o /tmp/go-link-3837878212/000096.o /tmp/go-link-3837878212/000097.o /tmp/go-link-3837878212/000098.o /tmp/go-link-3837878212/000099.o /tmp/go-link-3837878212/000100.o -O2 -g -O2 -g -lpthread -O2 -g -O2 -g -O2 -g -L/usr/lib/x86_64-linux-gnu -lGL -O2 -g -lGL -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -lm -lXinerama -ldl -lrt -O2 -g -Wl,-rpath,$ORIGIN -L/home/runner/work/danser-go/danser-go/framework/bass -L/home/runner/work/danser-go/danser-go/framework/bass/../../ -L/usr/lib/danser -L/usr/lib -lbass -lbass_fx -lbassmix -O2 -g -O2 -g -O2 -g /home/runner/go/pkg/mod/github.com/!allen!dang/[email protected]/imgui/../lib/linux/x64/cimgui.a -O2 -g -lX11 -L/usr/lib/x86_64-linux-gnu -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -lharfbuzz -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -O2 -g -lm -O2 -g -ldl -O2 -g -Wl,-rpath,$ORIGIN -L/home/runner/work/danser-go/danser-go/framework/util/pixconv -L/home/runner/work/danser-go/danser-go/framework/util/pixconv/../../../ -L/usr/lib/danser -L/usr/lib -lyuv -O2 -g -O2 -g -lresolv
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbass.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbass.so: .dynsym local symbol at index 3 (>= sh_info of 2)
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbass.so: .dynsym local symbol at index 4 (>= sh_info of 2)
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbassmix.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbassmix.so: .dynsym local symbol at index 3 (>= sh_info of 2)
/usr/bin/ld: /home/runner/work/danser-go/danser-go/framework/bass/../..//libbassmix.so: .dynsym local symbol at index 4 (>= sh_info of 2)
/usr/bin/ld: /home/runner/go/pkg/mod/github.com/!allen!dang/[email protected]/imgui/../lib/linux/x64/cimgui.a(imgui.cpp.o): relocation R_X86_64_PC32 against symbol `stdout@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
From what I've read, PIC static libraries have worse performance, so I guess it's not desirable for cimgui-go. I will probably create a fork just for my program with PIC cimgui.a, just wanted to put it there as a warning to others.
I guess another con of having a statically build cimgui 😅
The text was updated successfully, but these errors were encountered:
I'm trying to build a Linux version of my app, which first compiles it into a shared library that's loaded from executables. It builds fine on Windows, but I get this error on Linux:
From what I've read, PIC static libraries have worse performance, so I guess it's not desirable for cimgui-go. I will probably create a fork just for my program with PIC cimgui.a, just wanted to put it there as a warning to others.
I guess another con of having a statically build cimgui 😅
The text was updated successfully, but these errors were encountered: