[R] Possible ld.exe problem when building

Duncan Murdoch murdoch at stats.uwo.ca
Wed May 23 12:51:28 CEST 2007


On 23/05/2007 2:13 AM, Erin Hodgess wrote:
> Dear R People:
> 
> 
> I am trying to build R-2.5.0 from source on a Windows machinee.
> 
> I downloaded the tools and such, and started things off.

Could you give the details on what you downloaded?  As Brian said, it 
looks like you found obsolete copies.  Did you get them from my page? 
What URL?

Duncan Murdoch

> 
> I received some odd errors messages, looked on the R Search
> and found a similar problem.  The suggestion was to re-load
> "ld.exe".
> 
> I downloaded and installed everything again.  Same problem.
> 
> I am including my output.  
> c:\esr\R-2.5.0\src\gnuwin32>make all recommended
> make all recommended
> make[1]: `Rpwd.exe' is up to date.
> make[4]: Nothing to be done for `svnonly'.
> installing C headers
> make[2]: `all' is up to date.
> make[2]: `libRblas.dll.a' is up to date.
> make[5]: Nothing to be done for `svnonly'.
> installing C headers
> make --no-print-directory -C ../extra/intl OPTFLAGS='-O3 -Wall -pedantic -std=gnu99' -f Makefile.win
> make --no-print-directory -C ../appl OPTFLAGS='-O3 -Wall -pedantic -std=gnu99' FOPTFLAGS='-O3 -Wall' -f Makefile.win
> make --no-print-directory -C ../nmath OPTFLAGS='-O3 -Wall -pedantic -std=gnu99' -f Makefile.win
> make --no-print-directory -C ../main OPTFLAGS='-O3 -Wall -pedantic -std=gnu99' FFLAGS='-O3 -Wall' -f Makefile.win
> make --no-print-directory -C ./graphapp OPTFLAGS='-O3 -Wall -pedantic -std=gnu99'
> make --no-print-directory -C ./getline OPTFLAGS='-O3 -Wall -pedantic -std=gnu99'
> make[4]: `gl.a' is up to date.
> make -f Makefile.win chartables.h
> make[5]: `chartables.h' is up to date.
> make -f Makefile.win makeMakedeps
> make -f Makefile.win libpcre.a
> make[5]: `libpcre.a' is up to date.
> make[4]: Nothing to be done for `all'.
> make[4]: Nothing to be done for `all'.
> gcc  -shared -s -mwindows -o R.dll R.def console.o dataentry.o dynload.o edit.o editor.o embeddedR.o extra.o opt.o pager.o preferences.o psignal.o rhome.o rt_complete.o rui.o run.o shext.o sys-win32.o system.o dos_glob.o e_pow.o ../main/libmain.a ../appl/libappl.a ../nmath/libnmath.a graphapp/ga.a getline/gl.a ../extra/xdr/libxdr.a ../extra/zlib/libz.a ../extra/pcre/libpcre.a ../extra/bzip2/libbz2.a ../extra/intl/libintl.a ../extra/trio/libtrio.a dllversion.o -L. -lg2c -lRblas -lcomctl32 -lversion  
> console.o:console.c:(.text+0x44): undefined reference to `mbrtowc'
> console.o:console.c:(.text+0x9d): undefined reference to `mbrtowc'
> console.o:console.c:(.text+0x14f): undefined reference to `mbrtowc'
> console.o:console.c:(.text+0x6b1): undefined reference to `mbrtowc'
> console.o:console.c:(.text+0xc7c): undefined reference to `mbrtowc'
> console.o:console.c:(.text+0xcff): more undefined references to `mbrtowc' follow
> extra.o:extra.c:(.text+0x2240): undefined reference to `mallinfo'
> extra.o:extra.c:(.text+0x226f): undefined reference to `mallinfo'
> ../main/libmain.a(memory.o):memory.c:(.text+0x260): undefined reference to `Rm_free'
> ../main/libmain.a(memory.o):memory.c:(.text+0xa80): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0xbde): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0xc3d): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0xf4d): undefined reference to `Rm_calloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0xfae): undefined reference to `Rm_realloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0xfc8): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x2cbc): undefined reference to `Rm_free'
> ../main/libmain.a(memory.o):memory.c:(.text+0x35e0): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x38ef): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x3d3c): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x403f): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x462d): undefined reference to `Rm_malloc'
> ../main/libmain.a(memory.o):memory.c:(.text+0x4649): more undefined references to `Rm_malloc' follow
> ../main/libmain.a(memory.o):memory.c:(.text+0xffc): undefined reference to `Rm_free'
> ../main/libmain.a(printutils.o):printutils.c:(.text+0x6bd): undefined reference to `mbrtowc'
> ../main/libmain.a(printutils.o):printutils.c:(.text+0x9ce): undefined reference to `mbrtowc'
> ../main/libmain.a(engine.o):engine.c:(.text+0x7d6f): undefined reference to `mbrtowc'
> ../main/libmain.a(engine.o):engine.c:(.text+0x8016): undefined reference to `wcrtomb'
> ../main/libmain.a(plotmath.o):plotmath.c:(.text+0xfe7): undefined reference to `wcrtomb'
> ../main/libmain.a(plotmath.o):plotmath.c:(.text+0x1c11): undefined reference to `mbrtowc'
> ../main/libmain.a(plotmath.o):plotmath.c:(.text+0x24d0): undefined reference to `wcrtomb'
> ../main/libmain.a(arithmetic.o):arithmetic.c:(.text+0x2e7a): undefined reference to `expm1'
> ../main/libmain.a(gram.o):gram.c:(.text+0x7d): undefined reference to `mbrtowc'
> ../main/libmain.a(gram.o):gram.c:(.text+0x392): undefined reference to `mbrtowc'
> ../main/libmain.a(plot.o):plot.c:(.text+0x910): undefined reference to `mbrtowc'
> ../main/libmain.a(util.o):util.c:(.text+0x3806): undefined reference to `mbrtowc'
> ../main/libmain.a(util.o):util.c:(.text+0x387c): undefined reference to `mbrtowc'
> ../main/libmain.a(util.o):util.c:(.text+0x39df): more undefined references to `mbrtowc' follow
> ../main/libmain.a(regex.o):regex.c:(.text+0x25b): undefined reference to `wcrtomb'
> ../main/libmain.a(regex.o):regex.c:(.text+0x37a): undefined reference to `mbrtowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x3dd): undefined reference to `wcrtomb'
> ../main/libmain.a(regex.o):regex.c:(.text+0xd3c): undefined reference to `mbrtowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0xe39): undefined reference to `mbrtowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x220d): undefined reference to `mbrtowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x22fd): undefined reference to `btowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x2388): undefined reference to `wcrtomb'
> ../main/libmain.a(regex.o):regex.c:(.text+0x23e1): undefined reference to `wcrtomb'
> ../main/libmain.a(regex.o):regex.c:(.text+0x247d): undefined reference to `wcrtomb'
> ../main/libmain.a(regex.o):regex.c:(.text+0x5a6b): undefined reference to `btowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x5a91): undefined reference to `btowc'
> ../main/libmain.a(regex.o):regex.c:(.text+0x95f4): undefined reference to `btowc'
> ../main/libmain.a(scan.o):scan.c:(.text+0xb5b): undefined reference to `btowc'
> ../main/libmain.a(scan.o):scan.c:(.text+0xd12): undefined reference to `btowc'
> ../main/libmain.a(scan.o):scan.c:(.text+0xe45): more undefined references to `btowc' follow
> ../main/libmain.a(character.o):character.c:(.text+0x1dcf): undefined reference to `mbrtowc'
> ../main/libmain.a(character.o):character.c:(.text+0x528e): undefined reference to `wctrans'
> ../main/libmain.a(character.o):character.c:(.text+0x533f): undefined reference to `towctrans'
> ../nmath/libnmath.a(signrank.o):signrank.c:(.text+0xa3a): undefined reference to `expm1'
> ../nmath/libnmath.a(wilcox.o):wilcox.c:(.text+0xc0d): undefined reference to `expm1'
> ../nmath/libnmath.a(pgamma.o):pgamma.c:(.text+0x909): undefined reference to `expm1'
> ../nmath/libnmath.a(pgamma.o):pgamma.c:(.text+0xdc6): undefined reference to `expm1'
> ../nmath/libnmath.a(pexp.o):pexp.c:(.text+0x99): undefined reference to `expm1'
> ../nmath/libnmath.a(pexp.o):pexp.c:(.text+0xe6): more undefined references to `expm1' follow
> getline/gl.a(getline.o):getline.c:(.text+0x13f5): undefined reference to `mbrtowc'
> getline/gl.a(getline.o):getline.c:(.text+0x1acb): undefined reference to `mbrlen'
> getline/gl.a(getline.o):getline.c:(.text+0x1b02): undefined reference to `mbrlen'
> getline/gl.a(getline.o):getline.c:(.text+0x2160): undefined reference to `mbrtowc'
> getline/gl.a(getline.o):getline.c:(.text+0x2700): undefined reference to `mbrtowc'
> getline/gl.a(getline.o):getline.c:(.text+0x27f7): undefined reference to `mbrtowc'
> getline/gl.a(getline.o):getline.c:(.text+0x2fe9): undefined reference to `mbrtowc'
> getline/gl.a(getline.o):getline.c:(.text+0x319d): undefined reference to `mbrtowc'
> collect2: ld returned 1 exit status
> make[3]: *** [R.dll] Error 1
> make[2]: *** [../../bin/R.dll] Error 2
> make[1]: *** [rbuild] Error 2
> make: *** [all] Error 2
> 
> c:\esr\R-2.5.0\src\gnuwin32>
> 
> 
> Any suggestions would be much appreciated.  Yes, I know that I
> should just use the binaries.  Other than that one, please.
> 
> thanks,
> Sincerely,
> Erin Hodgess
> Associate Professor
> Department of Computer and Mathematical Sciences
> University of Houston - Downtown
> mailto: hodgess at gator.uhd.edu
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list