Archive: Problems building NSIS on linux


Problems building NSIS on linux
Hi

I have a linux mingw cross compiler setup, but I am having some problems when I try to build NSIS.

Does anyone have any ideas on how to fix this?

Thanks & Regards
elFarto

[root@thor Source]$ make
make -C exehead
make[1]: Entering directory `/tmp/NSIS/Source/exehead'
mkdir Release-zlib Release-bzip2 Release-lzma
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB bgbg.c -o Release-zlib/bgbg.o
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB exec.c -o Release-zlib/exec.o
exec.c: In function `ExecuteEntry':
exec.c:700: warning: dereferencing type-punned pointer will break strict-aliasing rules
exec.c:982: warning: dereferencing type-punned pointer will break strict-aliasing rules
exec.c:987: warning: dereferencing type-punned pointer will break strict-aliasing rules
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB fileform.c -o Release-zlib/fileform.o
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB Main.c -o Release-zlib/Main.o
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB Ui.c -o Release-zlib/Ui.o
Ui.c: In function `DialogProc':
Ui.c:543: warning: dereferencing type-punned pointer will break strict-aliasing rules
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB util.c -o Release-zlib/util.o
i386-mingw32-gcc -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB ../crc32.c -o Release-zlib/crc32.o
i386-mingw32-windres --input-format rc --output-format coff -o Release-zlib/resource.res -i resource.rc
i386-mingw32-gcc -x c -c -DEXEHEAD -DWIN32_LEAN_AND_MEAN -DZEXPORT=__stdcall -DLZMACALL=__fastcall -Wall -Os -DNSIS_COMPRESS_USE_ZLIB ../zlib/INFBLOCK.C -o Release-zlib/INFBLOCK.o
echo "SECTIONS" > sections_script
echo "{" >> sections_script
echo " .text : { *(.text) }" >> sections_script
echo " .data : { *(.data) }" >> sections_script
echo " .rdata : { *(.rdata) }" >> sections_script
echo " .bss : { *(.bss) }" >> sections_script
echo " .idata : { *(.idata) }" >> sections_script
echo " .ndata BLOCK(__section_alignment__) : { [ .ndata ] }" >> sections_script
echo " .rsrc : { *(.rsrc) }" >> sections_script
echo "}" >> sections_script
i386-mingw32-gcc -Wall -Os -DNSIS_COMPRESS_USE_ZLIB -s -mwindows -nostdlib -nostartfiles --enable-stdcall-fixup
-Wl,-Bdynamic -Wl,--file-alignment,512 -Wl,--exclude-libs,msvcrt.a -Wl,-e,_WinMain@16 -Wl,sections_script -Wl,-Map,Release-zlib/exehead_zlib.map
-o Release-zlib/exehead_zlib.exe Release-zlib/bgbg.o Release-zlib/exec.o Release-zlib/fileform.o Release-zlib/Main.o
Release-zlib/Ui.o Release-zlib/util.o Release-zlib/crc32.o Release-zlib/resource.res Release-zlib/INFBLOCK.o
-lole32 -lgdi32 -lversion -luuid -lcomctl32 -lkernel32 -luser32 -lshell32 -ladvapi32
Release-zlib/exec.o(.text+0x183):exec.c: undefined reference to `memcpy'
Release-zlib/Ui.o(.text+0x1ec2):Ui.c: undefined reference to `memcpy'
make[1]: *** [Release-zlib/exehead_zlib.exe] Error 1
make[1]: Leaving directory `/tmp/NSIS/Source/exehead'
make: *** [exehead] Error 2

Are you using gcc-3.4? If so, use an earlier version for now.


Yep, that was it, I was using 3.4.0, and I reverted to 3.3.4, and it built perfectly.

Thanks
elFarto


Workaround added in latest CVS version.