我正在尝试使用 Amazon Linux AMI 在 Amazon 的 EC2 实例上编译 QuantLib Python SWIG 绑定。我已经成功地编译了 QuantLib 本身,但是,在尝试编译 anaconda python swig 绑定时,我遇到了 -fno-plt 选项的错误。我把gcc编译器版本升级到了5.4.0,原来是4.8
首先我配置如下:
sudo ./configure --disable-perl --disable-ruby --disable-mzscheme --disable-guile --disable-csharp --disable-ocaml --disable-r --disable-java PYTHON=/opt/anaconda/anaconda2/bin/python
Run Code Online (Sandbox Code Playgroud)
然后我做如下:
make -C Python
Run Code Online (Sandbox Code Playgroud)
我收到错误:
make: Entering directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
make all-am
make[1]: Entering directory `/home/ec2-user/downloads/QuantLib-SWIG-1.8/Python'
CXXFLAGS="-O3 -fno-strict-aliasing -Wno-unused -Wno-uninitialized -Wno-sign-compare -Wno-write-strings" CC="gcc" CXX="g++" /opt/anaconda/anaconda2/bin/python setup.py build
running build
running build_py
running build_ext
building 'QuantLib._QuantLib' extension
gcc -fno-strict-aliasing -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -DNDEBUG -fwrapv …Run Code Online (Sandbox Code Playgroud) 我需要将本机库复制到 docker 映像的 /usr/lib 目录。我的 Quarkus 项目位于 IntelliJ 中,我尝试将此二进制 .so 文件放入 target/resources 文件夹中,并按如下方式修改 Dockerfile.jvm 但该文件未复制。下面是 Quarkus 在 skaffolding 过程中生成的 Dockerfile 的内容,我在 COPY 部分添加了一行:
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.1
ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en'
# Install java and the run-java script
# Also set up permissions for user `1001`
RUN microdnf install curl ca-certificates ${JAVA_PACKAGE} \
&& microdnf update \
&& microdnf clean all \
&& mkdir /deployments \
&& chown 1001 /deployments \
&& chmod "g+rwX" /deployments \
&& chown 1001:root …Run Code Online (Sandbox Code Playgroud)