Forum Stats

  • 3,757,792 Users
  • 2,251,266 Discussions
  • 7,869,916 Comments

Discussions

undefined symbol: glp_error_hook

User_1NH09
User_1NH09 Member Posts: 99 Red Ribbon
edited Jun 8, 2017 8:30AM in R Technologies

Hi guys,

We're trying to install Rglpk package however an error is raised and we don't have ideas how to solve it.

This is an Oracle R installation on top of Oracle Linux 6.9 (x86_64).

Appreciate your support.

Thanks

During startup - Warning message:Setting LC_CTYPE failed, using "C" * installing *source* package 'Rglpk' ...** package 'Rglpk' successfully unpacked and MD5 sums checkedDuring startup - Warning message:Setting LC_CTYPE failed, using "C" ** libsgcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_error.c -o Rglpk_error.ogcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_initialize.c -o Rglpk_initialize.ogcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_read_file.c -o Rglpk_read_file.ogcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_solve.c -o Rglpk_solve.ogcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c init.c -o init.ogcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o Rglpk.so Rglpk_error.o Rglpk_initialize.o Rglpk_read_file.o Rglpk_solve.o init.o -lglpk -L/usr/lib64/R/lib -lRinstalling to /usr/lib64/R/library/Rglpk/libs** R** inst** preparing package for lazy loading** help*** installing help indices  converting help for package 'Rglpk'    finding HTML links ... done    Rglpk_read_file                         html  Rd warning: /tmp/RtmpBCIgSW/R.INSTALLcf53f4f47e8/Rglpk/man/Rglpk_read_file.Rd:43: missing file link 'simple_triplet_matrix'Rd warning: /tmp/RtmpBCIgSW/R.INSTALLcf53f4f47e8/Rglpk/man/Rglpk_read_file.Rd:45: missing file link 'simple_triplet_matrix'    Rglpk_solve                             html  ** building package indices** testing if installed package can be loadedDuring startup - Warning message:Setting LC_CTYPE failed, using "C" Error in dyn.load(file, DLLpath = DLLpath, ...) :   unable to load shared object '/usr/lib64/R/library/Rglpk/libs/Rglpk.so':  /usr/lib64/R/library/Rglpk/libs/Rglpk.so: undefined symbol: glp_error_hookError: loading failedExecution haltedERROR: loading failed* removing '/usr/lib64/R/library/Rglpk'The downloaded source packages are in  '/tmp/RtmpTg2Pdn/downloaded_packages'Updating HTML index of packages in '.Library'Making 'packages.html' ... doneWarning message:In install.packages("Rglpk") :  installation of package 'Rglpk' had non-zero exit status
Christos Iraklis TsatsoulisUser_1NH09

Best Answer

  • rtiran
    rtiran Member Posts: 74 Bronze Badge
    edited Jun 7, 2017 11:48AM Accepted Answer

    Hello,

    I could reproduce your issue on an ol6.9 system as well.

    In order for the install to complete, I had to use an older version of Rglpk - i.e. version 6.0:

    [[email protected]**-**-*** ec2-user]# wget https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz

    --2017-06-07 11:35:51--  https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz

    Resolving cran.r-project.org... 137.208.57.37

    Connecting to cran.r-project.org|137.208.57.37|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 18284 (18K) [application/x-gzip]

    Saving to: “Rglpk_0.6-0.tar.gz”

    100%[======================================================================================================================================================================>] 18,284      --.-K/s  in 0.04s

    2017-06-07 11:35:52 (461 KB/s) - “Rglpk_0.6-0.tar.gz” saved [18284/18284]

    [[email protected]**-**-*** ec2-user]#  R CMD INSTALL Rglpk_0.6-0.tar.gz

    * installing to library ‘/usr/lib64/R/library’

    * installing *source* package ‘Rglpk’ ...

    ** package ‘Rglpk’ successfully unpacked and MD5 sums checked

    ** libs

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_initialize.c -o Rglpk_initialize.o

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_read_file.c -o Rglpk_read_file.o

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_solve.c -o Rglpk_solve.o

    gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/builddir/build/BUILD/R-3.3.0/port/Linux-X64/lib -o Rglpk.so Rglpk_initialize.o Rglpk_read_file.o Rglpk_solve.o -lglpk -L/usr/lib64/R/lib -lR

    installing to /usr/lib64/R/library/Rglpk/libs

    ** R

    ** inst

    ** preparing package for lazy loading

    ** help

    *** installing help indices

      converting help for package ‘Rglpk’

        finding HTML links ... done

        Rglpk_read_file                        html

    Rd warning: /tmp/Rtmpn3I7Nc/R.INSTALL65f27bb91e78/Rglpk/man/Rglpk_read_file.Rd:43: missing file link ‘simple_triplet_matrix’

    Rd warning: /tmp/Rtmpn3I7Nc/R.INSTALL65f27bb91e78/Rglpk/man/Rglpk_read_file.Rd:45: missing file link ‘simple_triplet_matrix’

        Rglpk_solve                            html

    ** building package indices

    ** testing if installed package can be loaded

    * DONE (Rglpk)

    Making 'packages.html' ... done

    [[email protected]**-**-*** ec2-user]#

    Install failed for me with all versions more recent than 6.0.

    That said, I could not reproduce that issue on an ol7.3 system and it works fine with the current version.

    Hope this helps.

    Regards,

    Raphaël

    Christos Iraklis TsatsoulisUser_1NH09

Answers

  • rtiran
    rtiran Member Posts: 74 Bronze Badge
    edited Jun 7, 2017 11:48AM Accepted Answer

    Hello,

    I could reproduce your issue on an ol6.9 system as well.

    In order for the install to complete, I had to use an older version of Rglpk - i.e. version 6.0:

    [[email protected]**-**-*** ec2-user]# wget https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz

    --2017-06-07 11:35:51--  https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz

    Resolving cran.r-project.org... 137.208.57.37

    Connecting to cran.r-project.org|137.208.57.37|:443... connected.

    HTTP request sent, awaiting response... 200 OK

    Length: 18284 (18K) [application/x-gzip]

    Saving to: “Rglpk_0.6-0.tar.gz”

    100%[======================================================================================================================================================================>] 18,284      --.-K/s  in 0.04s

    2017-06-07 11:35:52 (461 KB/s) - “Rglpk_0.6-0.tar.gz” saved [18284/18284]

    [[email protected]**-**-*** ec2-user]#  R CMD INSTALL Rglpk_0.6-0.tar.gz

    * installing to library ‘/usr/lib64/R/library’

    * installing *source* package ‘Rglpk’ ...

    ** package ‘Rglpk’ successfully unpacked and MD5 sums checked

    ** libs

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_initialize.c -o Rglpk_initialize.o

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_read_file.c -o Rglpk_read_file.o

    gcc -m64 -std=gnu99 -I/usr/lib64/R/../../include/R -DNDEBUG  -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/zlib -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/xz -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include/bzip2 -I/builddir/build/BUILD/R-3.3.0/port/Linux-X64/include    -fpic  -g -O2  -c Rglpk_solve.c -o Rglpk_solve.o

    gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/builddir/build/BUILD/R-3.3.0/port/Linux-X64/lib -o Rglpk.so Rglpk_initialize.o Rglpk_read_file.o Rglpk_solve.o -lglpk -L/usr/lib64/R/lib -lR

    installing to /usr/lib64/R/library/Rglpk/libs

    ** R

    ** inst

    ** preparing package for lazy loading

    ** help

    *** installing help indices

      converting help for package ‘Rglpk’

        finding HTML links ... done

        Rglpk_read_file                        html

    Rd warning: /tmp/Rtmpn3I7Nc/R.INSTALL65f27bb91e78/Rglpk/man/Rglpk_read_file.Rd:43: missing file link ‘simple_triplet_matrix’

    Rd warning: /tmp/Rtmpn3I7Nc/R.INSTALL65f27bb91e78/Rglpk/man/Rglpk_read_file.Rd:45: missing file link ‘simple_triplet_matrix’

        Rglpk_solve                            html

    ** building package indices

    ** testing if installed package can be loaded

    * DONE (Rglpk)

    Making 'packages.html' ... done

    [[email protected]**-**-*** ec2-user]#

    Install failed for me with all versions more recent than 6.0.

    That said, I could not reproduce that issue on an ol7.3 system and it works fine with the current version.

    Hope this helps.

    Regards,

    Raphaël

    Christos Iraklis TsatsoulisUser_1NH09
  • Christos Iraklis Tsatsoulis
    Christos Iraklis Tsatsoulis Member Posts: 85 Blue Ribbon
    edited Jun 8, 2017 7:54AM

    Nice catch Raphaël.

    Nevertheless, for me (in OL6.9) it would still not work, unless I set the CPATH environment variable.

    So, here are the steps that worked for me:

    1) Install glpk package:

    sudo yum install glpk glpk-devel

    2) Download & install an older version of the slam package (the latest one needs R >= 3.3.1):

    wget https://cran.r-project.org/src/contrib/Archive/slam/slam_0.1-32.tar.gz

    su root

    R CMD INSTALL slam_0.1-32.tar.gz

    3) Set the environment variable CPATH:

    export CPATH=/usr/include/glpk

    4) Download & install Rglpk 0.6-0:

    wget https://cran.r-project.org/src/contrib/Archive/Rglpk/Rglpk_0.6-0.tar.gz

    R CMD INSTALL Rglpk_0.6-0.tar.gz

    installing to library ‘/u01/app/oracle/product/12.1.0.2/dbhome_1/R/library’

    * installing *source* package ‘Rglpk’ ...

    ** package ‘Rglpk’ successfully unpacked and MD5 sums checked

    ** libs

    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_initialize.c -o Rglpk_initialize.o

    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_read_file.c -o Rglpk_read_file.o

    gcc -m64 -std=gnu99 -I/usr/include/R -DNDEBUG  -I/usr/local/include    -fpic  -g -O2  -c Rglpk_solve.c -o Rglpk_solve.o

    gcc -m64 -std=gnu99 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o Rglpk.so Rglpk_initialize.o Rglpk_read_file.o Rglpk_solve.o -lglpk -L/usr/lib64/R/lib -lR

    installing to /u01/app/oracle/product/12.1.0.2/dbhome_1/R/library/Rglpk/libs

    ** R

    ** inst

    ** preparing package for lazy loading

    ** help

    *** installing help indices

      converting help for package ‘Rglpk’

        finding HTML links ... done

        Rglpk_read_file                         html 

    Rd warning: /tmp/RtmpXVb3rd/R.INSTALL3454276682c/Rglpk/man/Rglpk_read_file.Rd:43: missing file link ‘simple_triplet_matrix’

    Rd warning: /tmp/RtmpXVb3rd/R.INSTALL3454276682c/Rglpk/man/Rglpk_read_file.Rd:45: missing file link ‘simple_triplet_matrix’

        Rglpk_solve                             html 

    ** building package indices

    ** testing if installed package can be loaded

    * DONE (Rglpk)

    In R:

    > library(Rglpk)

    Loading required package: slam

    Using the GLPK callable library version 4.40

    Christos

  • User_1NH09
    User_1NH09 Member Posts: 99 Red Ribbon
    edited Jun 8, 2017 8:30AM

    Thank you so much.

This discussion has been closed.