astamm / riot

riot: R Inputs/Outputs for Tractography
https://astamm.github.io/riot/
Other
4 stars 1 forks source link

Linking with vtkpugixml #7

Closed astamm closed 1 year ago

astamm commented 1 year ago

When testing on the win-builder machines, they complain upon linking (both release and devel):

g++ -shared -s -static-libgcc -o riot.dll tmp.def RcppExports.o fascicleReaders.o fascicleWriters.o tinyxml2.o -L../windows/vtk-9.2.2-1/lib-10.4.0/x64 -L../windows/vtk-9.2.2-1/lib/x64 -lvtkIOXML -lvtkIOXMLParser -lvtkIOCore -lvtkIOLegacy -lvtkCommonExecutionModel -lvtkCommonDataModel -lvtkCommonTransforms -lvtkCommonMath -lvtkCommonMisc -lvtkCommonSystem -lvtkCommonCore -lvtkdoubleconversion -lvtkexpat -lvtklz4 -lvtklzma -lvtkpugixml -lvtksys -lvtkzlib -lgdi32 -Ld:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -Ld:/rtools42/x86_64-w64-mingw32.static.posix/lib -LD:/RCompile/recent/R/bin/x64 -lR
D:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: cannot find -lvtkpugixml

that it does not find -lvtkpugixml. But it is there in the rwinlib/vtk . @jeroen: do I have to also contribute a PKGBUILD file somewhere in Rtools42 as well?

jeroen commented 1 year ago

I think you need to update the version here to 9.2.2: https://github.com/astamm/riot/blob/master/src/Makevars.win#L1

astamm commented 1 year ago

Oh I dis that already on my local copy not yet pushed on GitHub.

astamm commented 1 year ago

But it still throw the same error on win builder

jeroen commented 1 year ago

Can you show me the winbuilder log then?

astamm commented 1 year ago

Sure sorry, here it is https://win-builder.r-project.org/RT4aZRhlDL8U/

jeroen commented 1 year ago

I don't see any libvtkpugixml.a in https://github.com/rwinlib/vtk. Perhaps this plugin is not part of the Windows build. I think you should remove that flag from your Makevars.win.

astamm commented 1 year ago

It seems to be there: https://github.com/rwinlib/vtk/tree/master/lib/x64/lib

astamm commented 1 year ago

Apparently libs at location you provide are still for v9.0.1 while libs related to 9.2.2 have been copied into vtk/lib/x64/lib for a reason I don't know.

jeroen commented 1 year ago

OK maybe I messed up. I tried again, I think it looks good now: https://github.com/rwinlib/vtk/releases/tag/v9.2.2

astamm commented 1 year ago

Works perfectly. Thanks!