Skip to content
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

Unable to install the package "cplexAPI" #5

Open
ZENGTing94 opened this issue Nov 18, 2021 · 13 comments
Open

Unable to install the package "cplexAPI" #5

ZENGTing94 opened this issue Nov 18, 2021 · 13 comments

Comments

@ZENGTing94
Copy link

ZENGTing94 commented Nov 18, 2021

Dear Prof.Chen,

Thanks for your excellent work! I am a graduate student majoring in metabolomics. According to your User_guide, I have installed R, Rstudio, Rtools40, CPLEX and Git. And my question is in the step 1.3.2. I can't install the package "cplexAPI".

Could you please kindly give me some suggestions about it?

Thank you so much!

Best wishes
Ting Zeng

@LiChenPU
Copy link
Owner

LiChenPU commented Nov 18, 2021 via email

@lbrow121
Copy link

lbrow121 commented Dec 4, 2021

Hi there!

I am also having the same issue when installing the cplexAPI package. I have completed all steps of the user guide, including 1.3.2 step 3 where the package cplexAPI_1.4.0.tar.gz is successfully built. I'm having trouble installing it using the R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz line. I've searched online for help and found that MINGW64 compiler is potentially not supported by IBM (https://stackoverflow.com/questions/67462291/ilcplex-ilocplex-h-no-such-file-or-directory). What are your thoughts on this? Do you have any advice on this step? Thank you! The output is attached below.
Note: I did end up removing the dot before \cplexAPI_1.4.0.tar.gz as keeping the dot gave me the following error:
Warning: invalid package '.cplexAPI_1.4.0.tar.gz Error: ERROR: no packages specified


$ R CMD INSTALL --build --no-multiarch \cplexAPI_1.4.0.tar.gz

  • installing to library 'C:/Users/PC4/Documents/R/win-library/4.1'
  • installing source package 'cplexAPI' ...
    ** package 'cplexAPI' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    "C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA1/R/R-411.2/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c cplexAPI.c -o cplexAPI.o
    In file included from cplexAPI.h:26,
    from cplexAPI.c:26:
    cplexR.h:50:10: fatal error: ilcplex/cplex.h: No such file or directory
    #include <ilcplex/cplex.h>
    ^~~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [C:/PROGRA1/R/R-411.2/etc/x64/Makeconf:238: cplexAPI.o] Error 1
    ERROR: compilation failed for package 'cplexAPI'
  • removing 'C:/Users/PC4/Documents/R/win-library/4.1/cplexAPI'

@LiChenPU
Copy link
Owner

LiChenPU commented Dec 10, 2021 via email

@ZENGTing94
Copy link
Author

ZENGTing94 commented Dec 10, 2021 via email

@Owen-haha
Copy link

Hi Li,

Thanks for the great work!

I also have problem with cplexAPI but it is different to the above ones.
I am trying to configure NetID on MacOS, which I think it should be OK to run the core functions if the required packages can be installed successfully.

I have tried R4.0 and R4.1 to install the cplexAPI and both gave me the same error messages:

install.packages("../cplexAPI_1.4.0.tar.gz")
Warning in install.packages :
  package ‘../cplexAPI_1.4.0.tar.gz’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages

Do you know which R version could work for cplexAPI_1.4.0? Any suggestion to install this package? Have you tried to test NetID on MaxOS?

Thanks,
Owen

@zty12
Copy link
Collaborator

zty12 commented Jan 25, 2022

Hi Owen,
Maybe the following operation will help you.

  1. Make sure you have completed step a,b,c in the following figure

截屏2022-01-25 下午1 20 58

  1. Change step d to the following code:
    R CMD INSTALL --configure-args="
    --with-cplex-dir='/Applications/CPLEX_Studio1210/cplex'" /Users/{your name}/cplexAPI_1.4.0.tar.gz
    Note: These instructions are entered into the terminal.
    @Owen-haha

@nickyflowz
Copy link

Hello Professor Chen,

I am also trying to set up this program on my Mac.

I am having trouble with the last step installing the cplexAPI_1.4.0.tar.gz even though it is generated. It gives me an "zero-exit status" error. Any advice?

Thanks

@zty12
Copy link
Collaborator

zty12 commented Sep 19, 2022

Hi nickyflowz,
Maybe the following operation will help you.

  1. Check if C++ is installed in your computer environment
  2. Check if all dependency packages are installed correctly
  3. use this code: R CMD INSTALL --configure-args="
    --with-cplex-dir='/Applications/CPLEX_Studio1210/cplex'" /Users/{your name}/cplexAPI_1.4.0.tar.gz
    @nickyflowz

@nickyflowz
Copy link

Hello Zty12,

Thank you so much! After reinstalling C++ (Xcode for Mac) I was able to get the program up and running.

I used the following command, slightly different from what you wrote above:
% R CMD INSTALL --configure-args="
--with-cplex-dir='/Applications/CPLEX_Studio1210/cplex'" /Users/{your name}/desktop/cplexAPI_1.4.0.tar.gz

Really appreciate the help!

best

@RahulShanbhag1704
Copy link

I am also facing a similar issue but on Windows.
I have also added the _ in between, make it to __declspec(dllimport_deprecated).
I used the same command (R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz) and I am getting the following message on command prompt and then it is not compiling the package:

  • installing to library 'C:/Users/rshan/AppData/Local/R/win-library/4.3'
  • installing source package 'cplexAPI' ...
    ** package 'cplexAPI' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: 'gcc.exe (GCC) 12.2.0'
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexAPI.c -o cplexAPI.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from cplexAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexR.c -o cplexR.o
    In file included from cplexR.h:50,
    from cplexR.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_checkAPI.c -o cplex_checkAPI.o
    In file included from cplexR.h:50,
    from cplex_checkAPI.h:26,
    from cplex_checkAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_longparamAPI.c -o cplex_longparamAPI.o
    In file included from cplexR.h:50,
    from cplex_longparamAPI.h:26,
    from cplex_longparamAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from init.c:28:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR ; gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR
    no DLL was created
    ERROR: compilation failed for package 'cplexAPI'
  • removing 'C:/Users/rshan/AppData/Local/R/win-library/4.3/cplexAPI'

Please tell me what I should do, thanks!

@Jonah-K
Copy link

Jonah-K commented Jun 20, 2023

I am also facing a similar issue but on Windows. I have also added the _ in between, make it to __declspec(dllimport_deprecated). I used the same command (R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz) and I am getting the following message on command prompt and then it is not compiling the package:

  • installing to library 'C:/Users/rshan/AppData/Local/R/win-library/4.3'
  • installing source package 'cplexAPI' ...
    ** package 'cplexAPI' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: 'gcc.exe (GCC) 12.2.0'
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexAPI.c -o cplexAPI.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from cplexAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexR.c -o cplexR.o
    In file included from cplexR.h:50,
    from cplexR.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_checkAPI.c -o cplex_checkAPI.o
    In file included from cplexR.h:50,
    from cplex_checkAPI.h:26,
    from cplex_checkAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_longparamAPI.c -o cplex_longparamAPI.o
    In file included from cplexR.h:50,
    from cplex_longparamAPI.h:26,
    from cplex_longparamAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from init.c:28:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR ; gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR
    no DLL was created
    ERROR: compilation failed for package 'cplexAPI'
  • removing 'C:/Users/rshan/AppData/Local/R/win-library/4.3/cplexAPI'

Please tell me what I should do, thanks!

Hi RahulShanbhag1704,

I am experiencing a similar issue to you with the setup of the CPLEX API and was wondering if you managed to solve your problem. Our error seems to be very similar so I'm hoping for a common fix.

Thanks!

@suprarai
Copy link

I am also facing a similar issue but on Windows. I have also added the _ in between, make it to __declspec(dllimport_deprecated). I used the same command (R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz) and I am getting the following message on command prompt and then it is not compiling the package:

  • installing to library 'C:/Users/rshan/AppData/Local/R/win-library/4.3'
  • installing source package 'cplexAPI' ...
    ** package 'cplexAPI' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    using C compiler: 'gcc.exe (GCC) 12.2.0'
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexAPI.c -o cplexAPI.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from cplexAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplexR.c -o cplexR.o
    In file included from cplexR.h:50,
    from cplexR.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_checkAPI.c -o cplex_checkAPI.o
    In file included from cplexR.h:50,
    from cplex_checkAPI.h:26,
    from cplex_checkAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c cplex_longparamAPI.c -o cplex_longparamAPI.o
    In file included from cplexR.h:50,
    from cplex_longparamAPI.h:26,
    from cplex_longparamAPI.c:26:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -I"C:/PROGRA1/R/R-431.0/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include" -I"C:/rtools43/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c init.c -o init.o
    In file included from cplexR.h:50,
    from cplexAPI.h:26,
    from init.c:28:
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1598:20: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1598 | char const *filename_str);
    | ^~~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:1610:23: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 1610 | int *confnumcols_p);
    | ^~~
    C:/Program Files/IBM/ILOG/CPLEX_Studio2211/cplex/include/ilcplex/cplex.h:2734:31: warning: 'dllimport_deprecated' attribute directive ignored [-Wattributes] 2734 | int *confnumcols_p);
    | ^~~
    gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR ; gcc -shared -s -static-libgcc -o cplexAPI.dll tmp.def cplexAPI.o cplexR.o cplex_checkAPI.o cplex_longparamAPI.o init.o -L-LC:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/bin/x64_win64 -lm -lcplex22100 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools43/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA1/R/R-431.0/bin/x64 -lR
    no DLL was created
    ERROR: compilation failed for package 'cplexAPI'
  • removing 'C:/Users/rshan/AppData/Local/R/win-library/4.3/cplexAPI'

Please tell me what I should do, thanks!

Hi RahulShanbhag1704,

I am experiencing a similar issue to you with the setup of the CPLEX API and was wondering if you managed to solve your problem. Our error seems to be very similar so I'm hoping for a common fix.

Thanks!

Hi Rahul and Johan,
I am also having an issue with installing cplexAPI in R for windows 11 machine.

@suprarai
Copy link

Hi there!

I am also having the same issue when installing the cplexAPI package. I have completed all steps of the user guide, including 1.3.2 step 3 where the package cplexAPI_1.4.0.tar.gz is successfully built. I'm having trouble installing it using the R CMD INSTALL --build --no-multiarch .\cplexAPI_1.4.0.tar.gz line. I've searched online for help and found that MINGW64 compiler is potentially not supported by IBM (https://stackoverflow.com/questions/67462291/ilcplex-ilocplex-h-no-such-file-or-directory). What are your thoughts on this? Do you have any advice on this step? Thank you! The output is attached below. Note: I did end up removing the dot before \cplexAPI_1.4.0.tar.gz as keeping the dot gave me the following error: Warning: invalid package '.cplexAPI_1.4.0.tar.gz Error: ERROR: no packages specified

$ R CMD INSTALL --build --no-multiarch \cplexAPI_1.4.0.tar.gz

  • installing to library 'C:/Users/PC4/Documents/R/win-library/4.1'
  • installing source package 'cplexAPI' ...
    ** package 'cplexAPI' successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    "C:/rtools40/mingw64/bin/"gcc -I"C:/PROGRA1/R/R-411.2/include" -DNDEBUG -g -D_R_=1 -DUSE_R=1 -I"C:/Program Files/IBM/ILOG/CPLEX_Studio1210/cplex/include" -O2 -Wall -std=gnu99 -mfpmath=sse -msse2 -mstackrealign -c cplexAPI.c -o cplexAPI.o
    In file included from cplexAPI.h:26,
    from cplexAPI.c:26:
    cplexR.h:50:10: fatal error: ilcplex/cplex.h: No such file or directory
    #include <ilcplex/cplex.h>
    ^~~~~~~~~~~~~~~~~
    compilation terminated.
    make: *** [C:/PROGRA1/R/R-411.2/etc/x64/Makeconf:238: cplexAPI.o] Error 1
    ERROR: compilation failed for package 'cplexAPI'
  • removing 'C:/Users/PC4/Documents/R/win-library/4.1/cplexAPI'

Hi Did you solve your problem?
Hope to hear your idea :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants