-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Centos-7: segfault vrp_pickup_delivery.cc #1827
Comments
|
did you modify this sample ? where did you find it ? |
|
Sample was downloaded from google ortools site page: download: |
|
I can reproduce it using FROM centos:7
RUN yum -y update
RUN yum groupinstall -y 'Development Tools'
RUN yum install -y wget zlib-devel
USER root
WORKDIR /root
RUN wget https://github.com/google/or-tools/releases/download/v7.4/or-tools_centos-7_v7.4.7247.tar.gz
RUN tar xzvf *.tar.gz
WORKDIR /root/or-tools_CentOS-7.6.1810-64bit_v7.4.7247
COPY Makefile .
RUN make detect
RUN make run SOURCE=examples/cpp/vrp_pickup_delivery.ccnote I had to patch the Makefile to remove abseil dynamic library since we use static ones now --- old 2020-01-14 10:19:11.000000000 +0100
+++ Makefile 2020-01-14 10:19:42.000000000 +0100
@@ -68,37 +68,7 @@
LIB_PREFIX = lib
PRE_LIB = -Llib -Llib64
CBC_LNK = -lCbcSolver -lCbc -lOsiCbc -lCgl -lClpSolver -lClp -lOsiClp -lOsi -lCoinUtils
- ABSL_LNK = \
--labsl_bad_any_cast_impl \
--labsl_bad_optional_access \
--labsl_bad_variant_access \
--labsl_base \
--labsl_city \
--labsl_civil_time \
--labsl_debugging_internal \
--labsl_demangle_internal \
--labsl_dynamic_annotations \
--labsl_examine_stack \
--labsl_failure_signal_handler \
--labsl_graphcycles_internal \
--labsl_hash \
--labsl_hashtablez_sampler \
--labsl_int128 \
--labsl_leak_check \
--labsl_malloc_internal \
--labsl_optional \
--labsl_raw_hash_set \
--labsl_spinlock_wait \
--labsl_stacktrace \
--labsl_str_format_internal \
--labsl_strings \
--labsl_strings_internal \
--labsl_symbolize \
--labsl_synchronization \
--labsl_throw_delegate \
--labsl_time \
--labsl_time_zone
- OR_TOOLS_LNK = $(PRE_LIB) $(ABSL_LNK) -lprotobuf -lglog -lgflags $(CBC_LNK) -lortools
+ OR_TOOLS_LNK = $(PRE_LIB) -lprotobuf -lglog -lgflags $(CBC_LNK) -lortools
OBJ_OUT = -o #
EXE_OUT = -o #
O = .o |
|
note: we build the centos archive using the image FROM centos/devtoolset-7-toolchain-centos7
USER rootUsing this image instead of centos:7 it works, I guess glibc or a system lib is incompatible somehow... docker run --user root --rm --init -it centos:7
[root]# yum -y update
[root]# yum groupinstall -y 'Development Tools'
[root]# g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39)docker run --user root --rm --init -it centos/devtoolset-7-toolchain-centos7 /bin/bash
[root]# g++ --version
g++ (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) |
|
Ok, you have to install gcc-7.3 using: yum install centos-release-scl
yum install devtoolset-7-gcc-c++
export PATH=/opt/rh/devtoolset-7/root/usr/bin:$PATH
g++ --version
... |
|
confirmed no problem in g ++ 7.3.1 20180303. |
|
FYI we are dropping the support for cento-7 to replace it by centos-8 which don't have this issue since g++ default package is ok docker run --user root --rm --init -it centos:8
[root]# yum -y update
[root]# yum groupinstall -y 'Development Tools'
[root]# g++ --version
g++ (GCC) 8.3.1 20190507 (Red Hat 8.3.1-4) |
Setup
OS : CentOS Linux release 7.5.1804
Or-Tools : 7.4.7247
g++ : 4.8.5
Protocol
I compiled an example
vrp_pickup_delivery.ccusing:Observed
However, an aborted error occurred in the compiled executable.
Thank you.
The text was updated successfully, but these errors were encountered: