Make ignores 'GMP=false' (and other arguments) when installing ortools with SCIP bindings from source

142 views
Skip to first unread message

Sebastian Yonekura Baeza

unread,
Jan 15, 2019, 8:31:12 PM1/15/19
to or-tools-discuss
Hi, I'm following the installation guide ( https://developers.google.com/optimization/install/python/source_linux ) using SCIP 6.0.0 with the patch as a third party library, but after compiling scip with make GMP=false READLINE=false ZIMPL=false TPI=tny USRCFLAGS=-fPIC USRCXXFLAGS=-fPIC USRCPPFLAGS=-fPIC, when I run make install INSTALLDIR=/some/install/dir I get the following error (Ubuntu 18.04):

Screenshot_20190115_222047.png

But soplex/src/soplex/rational.h has a macro that should prevent the #include:

#ifdef SOPLEX_WITH_GMP
#include "gmp.h"
#endif

I'm guessing that somehow the input arguments to make are being ignored, because a similar problem happened in another machine running Ubuntu 18.10, just that that time it was in a later stage with the -fPIC flags getting ignored. I don't know how that could happen and I'm out of ideas about how to fix this

Laurent Perron

unread,
Jan 16, 2019, 4:43:01 AM1/16/19
to or-tools-discuss
Can you try make install with the same flags (GMP=...)
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00



--
You received this message because you are subscribed to the Google Groups "or-tools-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to or-tools-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 8:06:05 AM1/16/19
to or-tools-discuss
Got another error afterwards, I used make -j 4 python:

Screenshot_20190116_100454.png

Laurent Perron

unread,
Jan 16, 2019, 8:09:00 AM1/16/19
to or-tools-discuss
make clean
make GMP=false READLINE=false ZIMPL=false TPI=tny USRCFLAGS=-fPIC USRCXXFLAGS=-fPIC USRCPPFLAGS=-fPIC install INSTALLDIR=/some/install/dir

directly?
Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 8:26:28 AM1/16/19
to or-tools-discuss
Run: make clean; make GMP=false READLINE=false ZIMPL=false TPI=tny USRCFLAGS=-fPIC USRCXXFLAGS=-fPIC USRCPPFLAGS=-fPIC install INSTALLDIR=/home/syonekura/scip

The output log is attached, the error is different, now is the ZLIB flag:

-> install SCIP libraries into INSTALLDIR </home/syonekura/scip>
make[2]: Entering directory '/home/syonekura/scipoptsuite-6.0.0/scip'
-> linking bin/scip-6.0.0.linux.x86_64.gnu.opt.spx2.tny
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `mtx_init':
tinycthread.c:(.text+0x47): undefined reference to `pthread_mutexattr_init'
/usr/bin/x86_64-linux-gnu-ld: tinycthread.c:(.text+0x5a): undefined reference to `pthread_mutexattr_settype'
/usr/bin/x86_64-linux-gnu-ld: tinycthread.c:(.text+0x6f): undefined reference to `pthread_mutexattr_destroy'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `mtx_timedlock':
tinycthread.c:(.text+0xd5): undefined reference to `pthread_mutex_timedlock'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `mtx_trylock':
tinycthread.c:(.text+0x105): undefined reference to `pthread_mutex_trylock'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `thrd_create':
tinycthread.c:(.text+0x241): undefined reference to `pthread_create'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `thrd_detach':
tinycthread.c:(.text+0x2a5): undefined reference to `pthread_detach'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `thrd_join':
tinycthread.c:(.text+0x2fc): undefined reference to `pthread_join'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `tss_create':
tinycthread.c:(.text+0x385): undefined reference to `pthread_key_create'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `tss_set':
tinycthread.c:(.text+0x3c5): undefined reference to `pthread_setspecific'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `tss_delete':
tinycthread.c:(.text+0x3a1): undefined reference to `pthread_key_delete'
/usr/bin/x86_64-linux-gnu-ld: /home/syonekura/scipoptsuite-6.0.0/scip/lib/static/libtpitny-6.0.0.linux.x86_64.gnu.opt.a(tinycthread.o): in function `tss_get':
tinycthread.c:(.text+0x3b1): undefined reference to `pthread_getspecific'
collect2: error: ld returned 1 exit status
make[3]: Entering directory '/home/syonekura/scipoptsuite-6.0.0/scip'
build failed with ZLIB=true: if ZLIB is not available, try building with ZLIB=false
build failed with GMP=false and LPS=spx2: use GMP=true or make sure that SoPlex is also built without GMP support (make GMP=false)
make[3]: Leaving directory '/home/syonekura/scipoptsuite-6.0.0/scip'
make[2]: Leaving directory '/home/syonekura/scipoptsuite-6.0.0/scip'
-> install SCIP binary into INSTALLDIR </home/syonekura/scip>
install: cannot stat 'bin/scip-6.0.0.linux.x86_64.gnu.opt.spx2.tny': No such file or directory
make[1]: [make/make.install:80: installbinary] Error 1 (ignored)

scip.log

Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 8:30:29 AM1/16/19
to or-tools-discuss
BTW, ZLIB is installed:

sudo apt-get -y install git wget pkg-config build-essential cmake autoconf libtool zlib1g-dev lsb-release
Reading package lists... Done
Building dependency tree        
Reading state information... Done
autoconf is already the newest version (2.69-11).
build-essential is already the newest version (12.5ubuntu2).
cmake is already the newest version (3.12.1-1).
libtool is already the newest version (2.4.6-4).
lsb-release is already the newest version (9.20170808ubuntu1).
pkg-config is already the newest version (0.29.1-0ubuntu2).
wget is already the newest version (1.19.5-1ubuntu1).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-0ubuntu2).
git is already the newest version (1:2.19.1-1ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Laurent Perron

unread,
Jan 16, 2019, 8:31:04 AM1/16/19
to or-tools-discuss
Have you cleaned both soplex and scip?

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 8:50:31 AM1/16/19
to or-tools...@googlegroups.com
I made a shell script meant to be run from ~/ with:

tar -xvf ~/Downloads/scipoptsuite-6.0.0.tgz
tar -xvf ~/Downloads/scipoptsuite-6.0.0_patch01.tgz -C ~/scipoptsuite-6.0.0
cd ~/scipoptsuite-6.0.0
make clean
make -j 4 GMP=false READLINE=false ZIMPL=false TPI=tny USRCFLAGS=-fPIC USRCXXFLAGS=-fPIC USRCPPFLAGS=-fPIC install INSTALLDIR=/home/syonekura/scip

but the output is the same as before (build failed with ZLIB=true ...)

You received this message because you are subscribed to a topic in the Google Groups "or-tools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/or-tools-discuss/ZrMxu2qTkx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to or-tools-discu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Saludos,
Sebastián
install.sh

Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 12:02:10 PM1/16/19
to or-tools-discuss
if you mean to run make clean, yes. Also I did cd soplex; make clean; cd ..; cd scip; make clean; cd ..;

Laurent Perron

unread,
Jan 16, 2019, 3:36:05 PM1/16/19
to or-tools-discuss
Do you run one make from the root of scipoptsuite?

This is strange, we have built scip of multiples machines without any issues.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Sebastian Yonekura Baeza

unread,
Jan 16, 2019, 3:50:17 PM1/16/19
to or-tools...@googlegroups.com
Yes, I do one make from the root

Hmm, Now I made a Dockerfile to isolate the build, and the build worked, but then I extracted the Python wheel from that image and when running on my host it has a crash on linear_solver.cc. Is possible that there is some dependency not stated in the installation instructions that could interfere in the build process? I'm thinking in a situation where the machine has, for example, GMP installed and SCIP just ignores the flag since it has found it. I'm getting out of ideas that could explain this behavior


You received this message because you are subscribed to a topic in the Google Groups "or-tools-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/or-tools-discuss/ZrMxu2qTkx0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to or-tools-discu...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--
Saludos,
Sebastián

Laurent Perron

unread,
Jan 16, 2019, 5:05:27 PM1/16/19
to or-tools-discuss
I believe it would be the case.
You can use ldd to the shared libraries dependencies.

I am sorry I cannot help you more, but it really looks like a SCIP issue.

Laurent Perron | Operations Research | lpe...@google.com | (33) 1 42 68 53 00


Reply all
Reply to author
Forward
0 new messages