-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple definition of `strncasecmp' with the new toolschain #36
Comments
Have the static libraries in |
It is not too hard to set up a windows build environment, the instructions are at: https://github.com/Bioconductor/Bioconductor/blob/master/documentation/new-toolchain-setup.md I attempted to update the static libraries in I don't think making a change and then trying it in the single package builder is an efficient way to figure this out. A working build environment is required. @sneumann , please let me know how your attempt to set it up failed and I will help you. |
I worked on this a bit. I actually got mzR to install on i386 only. But had problems with x64, it seems to be the libnetcdf.a that is the problem. I tried both the original version that was there and also the one from local323.zip. It seems like perhaps this library needs to be rebuilt from source under the new toolchain? |
Is there any documentation anywhere about how that libnetcdf.a file was built and how to rebuild it? I don't have much more time to work on this...so I hope someone else can fix it. Otherwise our release will not include the proteomics stack on windows. |
I think |
Could we get a bit more history here... Various R packages uses NetCDF and On Mon, Apr 11, 2016 at 3:52 PM, Laurent Gatto notifications@github.com
|
I think that ncdf4 is the main R interface to netcdf. |
Like on CRAN they use netcdf 4, and here is the package on the CRAN Any reason for not starting with those; I assume Rnetcdf and ncdf4 (the two On Mon, Apr 11, 2016 at 4:04 PM, Kasper Daniel Hansen <
|
Hi Kasper, you guessed right, as Laurent hinted, the embedded libnetcdf I just had a quick look at ncdf4, it has libnetcdf as SystemRequirements: Yours, [1] https://groups.google.com/forum/#!topic/xcms-devel/fVdB85GxuZg |
Yes, they use the libnetcdf.a from spatial324.zip, and both those packages install from source just fine on moscato2. The above zip file is unzipped in
�� |
So why don't we try to use this one. Need some work on the Windows makevars file. Best,
|
Hoping more eyes can look at this. @mtmorgan @jimhester |
Im trying to get a virtual machine up and running, but its slow going. Kasper On Mon, Apr 11, 2016 at 9:25 PM, dtenenba notifications@github.com wrote:
|
I rebuilt ntcdf with the new toolchain using sources from http://www.stats.ox.ac.uk/pub/Rtools/goodies/sources/ and moved libnetcdf.a from that build to ** testing if installed package can be loaded
Error : .onLoad failed in loadNamespace() for 'mzR', details:
call: value[[3L]](cond)
error: failed to load module Ramp from package mzR
cannot allocate vector of length 1790997466
Error: loading failed
Execution halted
ERROR: loading failed Not sure what is going wrong, @dtenenba if you want to try with the recompiled libraries they are available at https://github.com/rwinlib/netcdf |
Hi @jimhester , that sounds like progress! I was able to get i386 to install but not x64, I get the same error as in the title of this issue (still). Can you spell out exactly what you did to get x64 to install? Here is what I tried:
Since I got i386 to install, and you got x64 to install, I am hoping that if I can do the latter, we might have solved this.... |
@jimhester Maybe you can email me your |
@dtenenba I used the SVN mzR (and included libpwiz.a) |
@jimhester I did a fresh checkout from svn and copied over the netcdf files. I am still getting the same results with the x64 installation attempt. The i386 install still works though. Would still be helpful I think to see exactly what you are doing. Thanks. |
OK I just tried from fresh windows 10 VM and got the same results as I did previously
source("https://bioconductor.org/biocLite.R")
biocLite(c("Rcpp", "Biobase", "BiocGenerics", "ProtGenerics", "msdata", "RUnit", "mzID", "BiocStyle", "knitr"))
download.file("https://bioconductor.org/packages/3.3/src/contrib/mzR_2.5.5.tar.gz", "mzR_2.5.5.tar.gz")
I used Note I did not copy any libraries in this case, but from the previous attempt I don't think it will help the error seen. |
How about environment variables like path Best,
|
Only environment variable I set was adding |
@jimhester I can reproduce your results exactly on a fresh Win10 VM (except I also had to install zlibbioc). Unfortunately I still get the same results on moscato2, but maybe @kasperdanielhansen is right that somehow the same DLL is on the PATH more than once, or it could be some other variable. I will look into it. I usually don't use |
OK, I was able to get x64 to build, by temporarily reverting to the original So, progress, but I'm not done, because mzR does not build in a vacuum, I have to get it to coexist with everything else that builds on moscato2. I'll send an update when I have sorted this out. Thanks all for your work on this. |
OK, rather than mess around with the settings on moscato2 which is a production build machine about to start a build, I figured out how to reproduce the problem on my VM. Hope some of you (particularly @jimhester ) can try these steps and help me figure out what is going on.
For me it fails with
Please see the external software page for a list of what libraries and headers are in spatial324.zip. Which one of those is causing the conflict, and how do we change mzR to avoid the conflict? Answering my own question a bit, I did the following:
After doing that, I can successfully install mzR. But that is not really a good option because it breaks other packages that depend on netcdf. Doing the converse (removing the netcdf header from As for the i386 failure on the VM, it turns out I can reproduce that as well on moscato2 when I use the 'stock' Thanks again |
So reading the various comments on the toolchain, it seems to me that Best, On Wed, Apr 13, 2016 at 8:05 PM, dtenenba notifications@github.com wrote:
|
You are correct about the different people responsible for the different toolchains. However, many system dependencies that worked with the old toolchain should, and in fact, do work with the new toolchain. It seems that all system dependencies that have only C code in them will work without being rebuilt (though I have found the following exceptions, sometimes just for a specific sub-architecture: gsl and tiff). The netcdf stuff in spatial324.zip works just fine with ncdf4 and Rnetcdf, I can build and check both of those packages under the new toolchain. I really think the problem has to do with the fact that mzR comes with its own netcdf library and header file which should not be necessary, and it causes the duplicate symbol error we see. I think it just needs a tweak to its Makevars.win but I haven't hit on the right one. |
ah, now I understand a bit better. You're saying the problem arises In that case, and using the historical info above, we should really just This seems like it should be relatively easy, since we can peak at (say) I might be able to devote some time to this over the weekend; I'm super Best, On Wed, Apr 13, 2016 at 10:46 PM, dtenenba notifications@github.com wrote:
|
Your understanding is correct, or at least it's what I think is going on. Don't hesitate to contact me if you have questions as you look into it. Thanks. |
At a glance I would say the Rnetcdf Makevars.win is more informative than the ncdf4 one. |
well, yeah, turns out spatial324 includes both libnetcdf and libnetcdf4 and Comments on this Steffen, Laurent? On Wed, Apr 13, 2016 at 11:15 PM, dtenenba notifications@github.com wrote:
|
Based on the contents of the src/win/x64 directory, I'd say mzR has been using libnetcdf. |
Dan, I have a build environment set up, I have replicated the mzR error and On Thu, Apr 14, 2016 at 12:01 AM, dtenenba notifications@github.com wrote:
|
Yes, that seems to be the right one. |
Ok I can reproduce the error multiple definition errors as well if I setup Index: src/Makevars.win
===================================================================
--- src/Makevars.win (revision 116189)
+++ src/Makevars.win (working copy)
@@ -7,7 +7,7 @@
## Use the R_HOME indirection to support installations of multiple R version
PKG_CPPFLAGS=-D_LARGEFILE_SOURCE $(PWIZ_CPPFLAGS) # last include only for cross-compiling
-PKG_CFLAGS=-D_LARGEFILE_SOURCE -I./win/$(R_ARCH) -D_MSC_VER -fgnu89-inline
+PKG_CFLAGS=-D_LARGEFILE_SOURCE -I./win/$(R_ARCH) -fgnu89-inline
## Faster Linker on BioC build farm:
## https://github.com/sneumann/mzR/issues/21#issuecomment-87802019 Also if you are using netcdf from The vector allocation issue on 32bit remains open however. |
Thanks so much @jimhester -- it works! Unfortunately I am now getting the i386 issue on moscato2 whereas I wasn't before. I wonder if removing the Does anyone have any thoughts on that? |
I was talking to @mtmorgan about this and he suggested that it might be useful for someone to:
I'm not sure I have the chops to debug C++ code like this, but someone else might want to. The puzzling thing is that mzR has not changed, so why is it using more memory now than before? It could be a new toolchain issue, or (just guessing) it could be related to a relatively recent update of Rcpp on CRAN (March 26, but we have been blocked by the x64 issue for a while and might not have noticed the i386 issue before). |
Just noticed something interesting. The package BubbleTree is failing in the latest build report: https://bioconductor.org/checkResults/devel/bioc-LATEST/BubbleTree/moscato2-checksrc.html The error is:
Notice that the length of the vector it is trying to allocate is EXACTLY the same as what we see above when trying to install mzR for i386. |
What's interesting is that CRAN's build system does not seem to have this issue, (even though moscato2 and both Jim's and my VM's have it) because I can install the binary version of multicool and it loads fine under i386, but if I try and build it from source, it fails. Reported this to Rcpp: |
One thing I'll try to address is that the way mzR uses Rcpp is not what is currently recommended, as far as I can see; I'm not an Rcpp expert. This is probably because Rcpp changes so fast and mzR has not been updated. Anyway, worth keeping in mind. Best,
|
OK, so leaving aside the issue that we can't update to the latest Rcpp because it isn't available on CRAN, I tried building mzR under the latest Rcpp from github and got a different error:
Also, I'd like to try following Dirk's suggestion that mzR explicitly use C++11, not sure how to make that happen? Is it just a matter of adding |
OK, just checked into svn a version of mzR that installs under both architectures (I think, need to confirm tonight) if you are running the latest Rcpp from github. Of course we need this to be in CRAN to really help us, they say it will go in before the R.3.3 release but it would be nice to clean up our build report before that. @mtmorgan What do you think of putting the latest Rcpp in our extra repos and modifying mzR/DESCRIPTION to require that version? Just as a temporary measure... |
Thanks Dan, In this case I think you need to put the Rcpp fix on the build servers. As Best, On Thu, Apr 14, 2016 at 6:18 PM, dtenenba notifications@github.com wrote:
|
@kasperdanielhansen , I tend to agree in principle but Rcpp needs to pass check before I do that. We'd expect the same for any other CRAN or Bioc package. I am working with Rcpp folks over at RcppCore/Rcpp#463 and I think we're getting close. |
I'm not going to argue with a requirement of passing R CMD check (well, On Fri, Apr 15, 2016 at 12:41 PM, dtenenba notifications@github.com wrote:
|
Rcpp now passes check! So I am in the process of putting it in our extra repos (for windows only) and verifying that mzR builds on both architectures. After that hopefully we can close this. Though mzR maintainers will need to be sure to merge recent changes from svn into github. |
Note that there will be no builds tonight but there will tomorrow night so hopefully we'll see a lot more green on Sunday. |
mzR now passes check on both architectures! Hopefully it and the packages that depend on it will be green on Sunday. Thanks everyone who helped out with this! When the changes from svn are merged into master, this issue can be closed. |
Hi, currently we have build issues on the windows machine of the build farm
for both http://bioconductor.org/checkResults/devel/bioc-LATEST/mzR/moscato2-buildsrc.html
and http://bioconductor.org/spb_reports/mzR_2.5.5.1_buildreport_20160404074007.html
Somehow, two the *.o from both *.c files (rnetCDF.c and R_init_mzR.o) include
the symbols from the stdlib, thus linking them results in
multiple definition of
strncasecmp'`.I tried both the ULDAR and standard linker, both give the same issue. I failed to set up
a local working development on Windows, so I can't help much here.
Yours,
Steffen
The text was updated successfully, but these errors were encountered: