Menu

Problems compiling...

Help
Javier
2005-10-18
2013-01-15
  • Javier

    Javier - 2005-10-18

    Hello,

    I am trying (unsuccessfully) to compile the newest version (0.3.3) of Rkward. My distro is a SUSE 9.2.

    To configure Rkward I used:
    ./configure --with-extra-includes=/usr/lib/R/include --with-extra-libs=/usr/lib/R/lib/ --prefix=/opt/kde3/

    After that I did 'make', and got this error:
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x661): In function `RE
    mbedInternal::getCommandAsRealVector(char const*, int*, REmbedInternal::RKWardRE
    rror*)':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x667): In function `RE
    mbedInternal::getCommandAsRealVector(char const*, int*, REmbedInternal::RKWardRE
    rror*)':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x76a): In function `RE
    mbedInternal::REmbedInternal[in-charge]()':
    undefined reference to `empty_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x781): In function `RE
    mbedInternal::REmbedInternal[in-charge]()':
    undefined reference to `unknown_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x78b): In function `RE
    mbedInternal::REmbedInternal[in-charge]()':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x791): In function `RE
    mbedInternal::REmbedInternal[in-charge]()':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x7ba): In function `RE
    mbedInternal::REmbedInternal[not-in-charge]()':
    undefined reference to `empty_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x7d1): In function `RE
    mbedInternal::REmbedInternal[not-in-charge]()':
    undefined reference to `unknown_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x7db): In function `R                                               mbedInternal::REmbedInternal[not-in-charge]()':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x7e1): In function `R                                               mbedInternal::REmbedInternal[not-in-charge]()':
    undefined reference to `na_double'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x919): In function `d                                               leteStrings':
    undefined reference to `empty_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0x921): In function `d                                               leteStrings':
    undefined reference to `unknown_char'
    ../rkward/rbackend/librbackend.a(rembedinternal.o)(.text+0xa06): In function `e                                               tractStrings':
    undefined reference to `empty_char'
    collect2: ld returned 1 exit status
    make[3]: *** [rkward] Error 1
    make[3]: Leaving directory `/home/javier/cajon/rkward-0.3.3/rkward'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/javier/cajon/rkward-0.3.3/rkward'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/javier/cajon/rkward-0.3.3'
    make: *** [all] Error 2

    Any idea about what's going wrong? Any hit to solve this problem will be appreciated.

    Thanks, in advance,

    Javier

     
    • Thomas Friedrichsmeier

      Please try this: In the file rkward/rkglobals.cpp, lines 33-35, remove the extern-keyword on each of those lines. I.e. they should read:

      char *RKGlobals::empty_char;
      char *RKGlobals::unknown_char;
      double RKGlobals::na_double;

      I believe/hope the extern definition is no longer needed, and likely it is what's causing those troubles.

       
      • Javier

        Javier - 2005-10-19

        I deleted the extern keyword. After that I did a 'make clean' and ./configure. Then, I repeated 'make', but I got the same error :-(

         
        • Thomas Friedrichsmeier

          Oh dear. I've had those strange linkage problems before. No idea, why they occur (and why they are so erratic). Please try this: Insert the following lines to rkward/rkward.cpp below line 85 (which is another workaround for a similarily absurd problem):

              RKGlobals::empty_char = const_cast<char*> ("");
              RKGlobals::unknown_char = const_cast<char*> ("");
              RKGlobals::na_double = 0.0;

          Maybe this does the trick.

           
    • Pierre

      Pierre - 2005-10-18

      Hi Javier,

      To me, it looks like the path to R headers is not the good one. However, we need more information. Could you please tell us the content of /usr/lib/R/include ? In addition, you could check where the R package that came with the distro put the headers? (your package manager should tell you that).

      Thanks for the report!

      Pierre

       
      • Pierre

        Pierre - 2005-10-18

        Forget what I said, Thomas is probably right...

         
    • Thomas Friedrichsmeier

      For the record (after some private discussions with haakin): This problem shoud be fixed in rkward 0.3.4. If you run into this or a similar issue with rkward >= 0.3.4, please inform us about it.

       
MongoDB Logo MongoDB