View Single Post
Old 25th May 2022, 05:35   #4
pkonduru
Member
 
Join Date: Jul 2015
Posts: 86
Error building the nsis src from 2.46

Hi Anders,

So I changed the code to use nsis 2.46, so this is what I am basically doing:
The {docker_image_nsis_thirdparty_zip} is basically my nsis-2.46.zip with the logging build. the {docker_image_nsis_src_download_url} is the url for the nsis-2.46 source code that I get from here:
https://jaist.dl.sourceforge.net/pro...46-src.tar.bz2

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 &&\
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/*


When I run this on RHEL, this is the error I get, when running the scons command:

g++ -o Source/ResourceVersionInfo.o -c -Wno-non-virtual-dtor -Wall -O2 -m32 "-DNSISCALL= __attribute__((__stdcall__))" -D_WIN32_IE=0x0500 -Ibuild/release/config Source/ResourceVersionInfo.cpp
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'
RM_DEFINE_FREEFUNC(close);
^
In file included from Source/script.cpp:46:0:
/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