LibSBML not detected at installation (Windows)
RomainTching opened this issue · comments
Hello,
I have an issue trying to use SBML2igraph
. Even though I installed libSBML
it seems like it's not detected during the NetPathMiner
installation as I keep getting the error
Error in SBML2igraph(filename = "myMap.xml", :
SBML2igraph requires libSBML to be present. Please reinstall NetPathMiner after installing libSBML.
I'm in Windows, using R-4.0.3
and I installed libSBML v5.19.0
, and the libSBML
R interface is installed as well.
I also copied the NPM_dependencies.tar.gz
into my R/R-4.0.3/
R HOME directory before the installation of NetPathMiner
, and even tried unzipping it there as well, but the error persists.
Looking around I found people with similar issues like here, although I couldn't find a fix that worked...
Do you have any suggestion? Did I miss a step somewhere? Is there maybe some environment variable I need to set to the libSBML
installation folder, or a parameter to set for the NPM_dependencies.tar.gz
file?
Thanks for your help!
Installing NetPathMiner from source is not a trivial task on Windows. Could you please use BiocManager::install("NetPathMiner")
to install the binaries with LibSBML included. Let me know if this doesn't work out.
Refer to http://bioconductor.org/packages/release/bioc/html/NetPathMiner.html for more details as well.
Hello, that's what I used to install NetPathMiner from the beginning. But I thought that before that, libSBML had to be downloaded from SourceForge and installed separately, was I mistaken?
I just tried to uninstall the libSBML program and R interface from my computer and re-install NetPathMiner, but I still get the same error... Did I perhaps misplace the dependencies archive?
My bad! I forgot that SBML is not supported on Bioconductor for Windows.
If you need SBML, you need to install from source, with NPM dependencies placed in R RHOME
as you have done. You need to specify source installation using BiocManager::install("NetPathMiner", type="source")
.
Let me know if that works out.
There are many notes and warnings during the source installation, however there seems to be an issue at compilation, though I'm not completely sure what:
C:/rtools40/mingw32/bin/g++ -std=gnu++11 -shared -s -static-libgcc -o NetPathMiner.dll tmp.def PathRanker.o handlesegfault.o hme3m.o init.o kgml_interface.o methods.o pathScope.o sbml_interface.o -Llibs/i386 -lsbml -lxml2 -liconv -lstdc++ -LC:/Users/Public/R/R-4.0.3/bin/i386 -lRlapack -LC:/Users/Public/R/R-4.0.3/bin/i386 -lRblas -lgfortran -lm -lquadmath -LC:/Users/Public/R/R-4.0.3/bin/i386 -lR
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x1b8): undefined reference to `_imp___ZN6CVTerm14getResourceURIB5cxx11Ej'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0xd22): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0xe52): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x10c4): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x1113): undefined reference to `_imp___ZNK7Species14getCompartmentB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x1f6f): undefined reference to `_imp___ZNK7Species14getCompartmentB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x2f65): undefined reference to `_imp___ZNK8XMLError15getShortMessageB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x3768): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x38c8): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x3a28): undefined reference to `_imp___ZNK22SimpleSpeciesReference10getSpeciesB5cxx11Ev'
C:/rtools40/mingw32/bin/../lib/gcc/i686-w64-mingw32/8.3.0/../../../../i686-w64-mingw32/bin/ld.exe: sbml_interface.o:sbml_interface.cpp:(.text+0x4389): undefined reference to `_imp___ZNK8XMLError15getShortMessageB5cxx11Ev'
collect2.exe: error: ld returned 1 exit status
mkdir -p "C:/Users/Public/R/R-Library/00LOCK-NetPathMiner/00new/NetPathMiner/libs/i386"
cp libs/i386/*.dll "C:/Users/Public/R/R-Library/00LOCK-NetPathMiner/00new/NetPathMiner/libs/i386"
no DLL was created
ERROR: compilation failed for package 'NetPathMiner'
* removing 'C:/Users/Public/R/R-Library/NetPathMiner'
The dependencies archive file is found at the beginning of the process. On the other hand, in the output I just copied here, there is the passage -LC:/Users/Public/R/R-4.0.3/bin/i386
that leaves me wondering, since none of the *.dll
from the dependencies archive are present at the end in that folder. Could the issue be linked somehow (though copying them in that folder before installation doesn't solve the error)?
Sorry for the trouble, I'm really grateful for your help!
Thanks for your patience.
Most of the warnings during compilation is due to an outdated BoostGraph dependency that we cannot change, unfortunately.
The error however is in the library linking process (ld.exe
). I've checked the installation, and dlls
from NPM_dependencies
are correctly placed inside the temp installation folder NetPathMiner/src/libs
, which are already in path with the flag -Llibs/i386
. This leaves one possibility: Name mangling of C++ code is different between NPM_dependencies
and the current compiling environment (more here). This is likely due to changes in C++ compilers in the last few years, and the only way is to rebuild NPM_dependencies
again.
At this point, I'd recommend moving away from trying to build from source on Windows, and either use a different OS, or a virtual machine. I will create a docker
image for NetPathMiner over the next week, so that Windows users (and other OSes too) can just run without. dealing with the system dependencies nightmare.
If you have other suggestions, I'll be happy to help.
Cheers.
Hi!
I see, I'll try to see if using a VM fits my needs, or try to find another way otherwise. I'll keep an eye on NetPathMiner and try out the docker once it becomes available.
In any case, thanks for all your help in this matter!
Cheers!
Hi @RomainTching,
I've added docker option to NetPathMiner. Please refer to instructions in README if you need to use it.
I'll close this issue now, as I'm unlikely to re-build NPM_dependencies
. Please feel free to open if needed.
Cheers.
Hello!
The docker seems to work fine, thank you so much for your help!
Cheers!