NVIDIAGameWorks / FleX

Other
664 stars 100 forks source link

Fresh build fails on Ubuntu 16.04 due to linker error #26

Open axdorferbua opened 6 years ago

axdorferbua commented 6 years ago

flexDemoCUDA: compiling debug ./../../../core/voxelize.cpp... build/flexDemoCUDA_debug/main.cpp.o: In function main': /home/user/FleX/demo/compiler/makelinux64/./../../main.cpp:3117: undefined reference toNvFlexDeviceGetSuggestedOrdinal()' /home/user/FleX/demo/compiler/makelinux64/./../../main.cpp:3123: undefined reference to `NvFlexDeviceCreateCudaContext(int)' collect2: error: ld returned 1 exit status Makefile.flexDemoCUDA.mk:160: recipe for target '../../../bin/linux64/NvFlexDemoDebugCUDA_x64' failed make: *** [../../../bin/linux64/NvFlexDemoDebugCUDA_x64] Error 1

axdorferbua commented 6 years ago

The build (FleX/demo/compiler/makelinux64 -> make) fails on a newly cloned version of Flex. Any suggestions how to correct the issue?

mmacklin commented 6 years ago

Apologies for this. We are currently in the process of improving our Linux support and will address this in the next 1.2 release.

Cheers, Miles

zyablik commented 5 years ago

The same issue is still present in 1.2 the following patch should fix it

--- a/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk
+++ b/demo/compiler/makelinux64/Makefile.flexDemoCUDA.mk
@@ -43,6 +43,7 @@ flexDemoCUDA_release_libraries += :NvFlexExtReleaseCUDA_x64.a
 flexDemoCUDA_release_libraries += :NvFlexReleaseCUDA_x64.a
 flexDemoCUDA_release_libraries += :NvFlexExtReleaseCUDA_x64.a
 flexDemoCUDA_release_libraries += :libSDL2.a
+flexDemoCUDA_release_libraries += :NvFlexDeviceRelease_x64.a
 flexDemoCUDA_release_libraries += :libSDL2main.a
 flexDemoCUDA_release_common_cflags     := $(flexDemoCUDA_custom_cflags)
 flexDemoCUDA_release_common_cflags    += -MMD
@@ -125,6 +126,7 @@ flexDemoCUDA_debug_libraries += :NvFlexExtDebugCUDA_x64.a
 flexDemoCUDA_debug_libraries += :NvFlexDebugCUDA_x64.a
 flexDemoCUDA_debug_libraries += :NvFlexExtDebugCUDA_x64.a
 flexDemoCUDA_debug_libraries += :libSDL2.a
+flexDemoCUDA_debug_libraries += :NvFlexDeviceDebug_x64.a
 flexDemoCUDA_debug_libraries += :libSDL2main.a
 flexDemoCUDA_debug_common_cflags       := $(flexDemoCUDA_custom_cflags)
 flexDemoCUDA_debug_common_cflags    += -MMD