View Single Post
Old 26th May 2022, 04:27   #8
Join Date: Jul 2015
Posts: 86
Thank you Anders, I tried that but it gave this error.
First, here is my script:

COPY {{ docker_image_nsis_thirdparty_zip }} /tmp/
RUN mkdir /tmp/nsis &&\
yum install -y ca-certificates &&\
wget {{ docker_image_nsis_src_download_url }} -P /tmp/nsis/ &&\
yum install -y scons glibc-devel glibc-devel.i686 &&\
unzip /tmp/{{ docker_image_nsis_thirdparty_zip }} -d /usr/local/nsis/ &&\
tar -xvf /tmp/nsis/{{ docker_image_nsis_src_download_url|basename }} -C /usr/local/src/ &&\
mv /usr/local/src/nsis-* /usr/local/src/nsis &&\
cd /usr/local/src/nsis &&\
echo "#define NSIS_CONFIG_LOG" >> /usr/local/src/nsis/Source/exehead/config.h &&\
echo "#include <unistd.h>" >> /usr/local/src/nsis/Source/util.h &&\
scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_LOG=yes NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/usr/local/nsis/bin install-compiler &&\
ln -s /usr/local/nsis/bin/makensis /usr/local/bin/makensis &&\
yum clean all &&\
rm -rf /var/cache/yum &&\
rm -rf /tmp/*

This is the error I get:

g++ -o Source/script.o -c -Wno-non-virtual-dtor -Wall -O2 -m32 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/script.cpp
In file included from Source/script.cpp:22:0:
Source/util.h: In instantiation of 'void __free_with_close:perator()(T&) [with T = int]':
Source/util.h:114:32: required from 'ResourceManager<_RESOURCE, _FREE_RESOURCE>::~ResourceManager() [with _RESOURCE = int; _FREE_RESOURCE = __free_with_close]'
Source/script.cpp:6460:1: required from here
Source/util.h:128:59: error: 'close' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
template <typename T> void operator()(T& x) { freefunc(x); } \
Source/util.h:145:1: note: in expansion of macro 'RM_DEFINE_FREEFUNC'
In file included from Source/util.h:159:0,
from Source/script.cpp:22:
/usr/include/unistd.h:353:12: note: 'int close(int)' declared here, later in the translation unit
extern int close (int __fd);
scons: *** [Source/script.o] Error 1
scons: building terminated because of errors.
pkonduru is offline   Reply With Quote