View Issue Details

IDProjectCategoryView StatusLast Update
0001354OpenMPTlibopenmptpublic2020-08-21 06:46
Reporterhydra3333 Assigned Tomanx  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Platformx64OSWindowsOS Version10
Product VersionOpenMPT 1.30.00.* (old testing) 
Fixed in VersionOpenMPT 1.30.00.* (old testing) 
Summary0001354: github commit 23e289387f0bf5bf31d1b0caf97c6526756a9f25 kills cross-compiling under Mingw64
Description

Under github commit 91bad3bd24045dab4d0d9ad952f02a391a059c7d it builds OK.

Under github commit 23e289387f0bf5bf31d1b0caf97c6526756a9f25 building crashes as shown in the log below.

The relevant error message is "collect2: fatal error: cannot find 'ld'" so something changed in commit 23e289387f0bf5bf31d1b0caf97c6526756a9f25

[22:56:23][INFO] Finished GIT cloning 'https://github.com/OpenMPT/openmpt.git' to 'openmpt_git'
Changing dir from /home/u/Desktop/_working/workdir/x86_64 to openmpt_git
[22:56:23][DEBUG] cd openmpt_git
[22:56:23][DEBUG] git clean -ffdx
[22:56:23][DEBUG] Running 'git clean -ffdx' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[22:56:23][DEBUG] git submodule foreach --recursive git clean -ffdx
[22:56:23][DEBUG] Running 'git submodule foreach --recursive git clean -ffdx' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[22:56:23][DEBUG] git reset --hard
[22:56:23][DEBUG] Running 'git reset --hard' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
HEAD is now at 23e289387 [Mod] build: Makefile: Consolidate warning otiosn for all GCC and all Clang backends. [Mod] build: Makefile: Add -Wpedantic to default set of warnigns for all compilers.
[22:56:24][DEBUG] git submodule foreach --recursive git reset --hard
[22:56:24][DEBUG] Running 'git submodule foreach --recursive git reset --hard' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[22:56:24][DEBUG] git submodule update --init --recursive
[22:56:24][DEBUG] Running 'git submodule update --init --recursive' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
##############################
[22:56:24][INFO][MAKE] Building 'openmpt' with 'build_options': 'CONFIG=mingw64-win64 TEST=0 SHARED_LIB=0 STATIC_LIB=1 EXAMPLES=0 MODERN=1' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[22:56:24][DEBUG] make -j 4 CONFIG=mingw64-win64 TEST=0 SHARED_LIB=0 STATIC_LIB=1 EXAMPLES=0 MODERN=1
[22:56:24][DEBUG] Running 'make -j 4 CONFIG=mingw64-win64 TEST=0 SHARED_LIB=0 STATIC_LIB=1 EXAMPLES=0 MODERN=1' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[CXX] common/ComponentManager.cpp
[CXX] common/FileReader.cpp
[CXX] common/Logging.cpp
[CXX] common/Profiler.cpp
[CXX] common/misc_util.cpp
[CXX] common/mptAlloc.cpp
[CXX] common/mptCPU.cpp
[CXX] common/mptCrypto.cpp
[CXX] common/mptFileIO.cpp
[CXX] common/mptIO.cpp
[CXX] common/mptLibrary.cpp
[CXX] common/mptOS.cpp
[CXX] common/mptPathString.cpp
[CXX] common/mptRandom.cpp
[CXX] common/mptString.cpp
[CXX] common/mptStringBuffer.cpp
[CXX] common/mptStringFormat.cpp
[CXX] common/mptStringParse.cpp
[CXX] common/mptTime.cpp
[CXX] common/mptUUID.cpp
[CXX] common/mptWine.cpp
[CXX] common/serialization_utils.cpp
[CXX] common/version.cpp
[CXX] soundbase/Dither.cpp
[CXX] soundlib/AudioCriticalSection.cpp
[CXX] soundlib/ContainerMMCMP.cpp
[CXX] soundlib/ContainerPP20.cpp
[CXX] soundlib/ContainerUMX.cpp
[CXX] soundlib/ContainerXPK.cpp
[CXX] soundlib/Dlsbank.cpp
[CXX] soundlib/Fastmix.cpp
[CXX] soundlib/ITCompression.cpp
[CXX] soundlib/ITTools.cpp
[CXX] soundlib/InstrumentExtensions.cpp
[CXX] soundlib/Load_669.cpp
[CXX] soundlib/Load_amf.cpp
[CXX] soundlib/Load_ams.cpp
[CXX] soundlib/Load_c67.cpp
[CXX] soundlib/Load_dbm.cpp
[CXX] soundlib/Load_digi.cpp
[CXX] soundlib/Load_dmf.cpp
[CXX] soundlib/Load_dsm.cpp
[CXX] soundlib/Load_dtm.cpp
[CXX] soundlib/Load_far.cpp
[CXX] soundlib/Load_gdm.cpp
[CXX] soundlib/Load_imf.cpp
[CXX] soundlib/Load_it.cpp
[CXX] soundlib/Load_itp.cpp
[CXX] soundlib/Load_mdl.cpp
[CXX] soundlib/Load_med.cpp
[CXX] soundlib/Load_mid.cpp
[CXX] soundlib/Load_mo3.cpp
[CXX] soundlib/Load_mod.cpp
[CXX] soundlib/Load_mt2.cpp
[CXX] soundlib/Load_mtm.cpp
In file included from soundlib/Loaders.h:15,
from soundlib/Load_mod.cpp:14:
soundlib/../common/FileReader.h: In static member function 'static OpenMPT::CSoundFile::ProbeResult OpenMPT::CSoundFile::ProbeFileHeaderICE(OpenMPT::MemoryFileReader, const uint64)':
soundlib/../common/FileReader.h:642:10: warning: '
((void*)& destArray +1)' may be used uninitialized in this function [-Wmaybe-uninitialized]
642 | return destArray;
| ^~~~~
[CXX] soundlib/Load_okt.cpp
[CXX] soundlib/Load_plm.cpp
[CXX] soundlib/Load_psm.cpp
[CXX] soundlib/Load_ptm.cpp
[CXX] soundlib/Load_s3m.cpp
[CXX] soundlib/Load_sfx.cpp
[CXX] soundlib/Load_stm.cpp
[CXX] soundlib/Load_stp.cpp
[CXX] soundlib/Load_uax.cpp
[CXX] soundlib/Load_ult.cpp
[CXX] soundlib/Load_wav.cpp
[CXX] soundlib/Load_xm.cpp
[CXX] soundlib/MIDIEvents.cpp
[CXX] soundlib/MIDIMacros.cpp
[CXX] soundlib/MPEGFrame.cpp
[CXX] soundlib/Message.cpp
[CXX] soundlib/MixFuncTable.cpp
[CXX] soundlib/MixerLoops.cpp
[CXX] soundlib/MixerSettings.cpp
[CXX] soundlib/ModChannel.cpp
[CXX] soundlib/ModInstrument.cpp
[CXX] soundlib/ModSample.cpp
[CXX] soundlib/ModSequence.cpp
[CXX] soundlib/OPL.cpp
[CXX] soundlib/OggStream.cpp
[CXX] soundlib/Paula.cpp
[CXX] soundlib/RowVisitor.cpp
[CXX] soundlib/S3MTools.cpp
[CXX] soundlib/SampleFormatBRR.cpp
[CXX] soundlib/SampleFormatFLAC.cpp
[CXX] soundlib/SampleFormatMP3.cpp
[CXX] soundlib/SampleFormatMediaFoundation.cpp
[CXX] soundlib/SampleFormatOpus.cpp
[CXX] soundlib/SampleFormatSFZ.cpp
[CXX] soundlib/SampleFormatVorbis.cpp
[CXX] soundlib/SampleFormats.cpp
[CXX] soundlib/SampleIO.cpp
[CXX] soundlib/Snd_flt.cpp
[CXX] soundlib/Snd_fx.cpp
[CXX] soundlib/Sndfile.cpp
[CXX] soundlib/Sndmix.cpp
[CXX] soundlib/SoundFilePlayConfig.cpp
[CXX] soundlib/Tables.cpp
[CXX] soundlib/Tagging.cpp
[CXX] soundlib/TinyFFT.cpp
[CXX] soundlib/UMXTools.cpp
[CXX] soundlib/UpgradeModule.cpp
[CXX] soundlib/WAVTools.cpp
[CXX] soundlib/WindowedFIR.cpp
[CXX] soundlib/XMTools.cpp
[CXX] soundlib/load_j2b.cpp
[CXX] soundlib/mod_specifications.cpp
[CXX] soundlib/modcommand.cpp
[CXX] soundlib/modsmp_ctrl.cpp
[CXX] soundlib/pattern.cpp
[CXX] soundlib/patternContainer.cpp
[CXX] soundlib/tuning.cpp
[CXX] soundlib/tuningCollection.cpp
[CXX] soundlib/plugins/DigiBoosterEcho.cpp
[CXX] soundlib/plugins/LFOPlugin.cpp
[CXX] soundlib/plugins/PlugInterface.cpp
[CXX] soundlib/plugins/PluginManager.cpp
[CXX] soundlib/plugins/dmo/Chorus.cpp
[CXX] soundlib/plugins/dmo/Compressor.cpp
[CXX] soundlib/plugins/dmo/DMOPlugin.cpp
[CXX] soundlib/plugins/dmo/Distortion.cpp
[CXX] soundlib/plugins/dmo/Echo.cpp
[CXX] soundlib/plugins/dmo/Flanger.cpp
[CXX] soundlib/plugins/dmo/Gargle.cpp
[CXX] soundlib/plugins/dmo/I3DL2Reverb.cpp
[CXX] soundlib/plugins/dmo/ParamEq.cpp
[CXX] soundlib/plugins/dmo/WavesReverb.cpp
[CXX] sounddsp/AGC.cpp
[CXX] sounddsp/DSP.cpp
[CXX] sounddsp/EQ.cpp
[CXX] sounddsp/Reverb.cpp
[CXX] libopenmpt/libopenmpt_c.cpp
[CXX] libopenmpt/libopenmpt_cxx.cpp
[CXX] libopenmpt/libopenmpt_impl.cpp
[CXX] libopenmpt/libopenmpt_ext_impl.cpp
[CC] include/miniz/miniz.c
include/miniz/miniz.c: In function 'mz_zip_writer_write_zeros':
include/miniz/miniz.c:6087:1: warning: the frame size of 4112 bytes is larger than 4000 bytes [-Wframe-larger-than=]
6087 | }
| ^
[CC] include/minimp3/minimp3.c
include/miniz/miniz.c: In function 'mz_zip_reader_read_central_dir':
include/miniz/miniz.c:3798:1: warning: the frame size of 4272 bytes is larger than 4000 bytes [-Wframe-larger-than=]
3798 | }
| ^
[CC] include/stb_vorbis/stb_vorbis.c
include/stb_vorbis/stb_vorbis.c: In function 'decode_residue':
include/stb_vorbis/stb_vorbis.c:924:68: warning: ISO C forbids conditional expr with only one void side [-Wpedantic]
924 | #define temp_free(f,p) (f->alloc.alloc_buffer ? 0 : free(p)) // OpenMPT
| ^
include/stb_vorbis/stb_vorbis.c:2273:4: note: in expansion of macro 'temp_free'
2273 | temp_free(f,part_classdata);
| ^~~~~
include/stb_vorbis/stb_vorbis.c: In function 'inverse_mdct':
include/stb_vorbis/stb_vorbis.c:924:68: warning: ISO C forbids conditional expr with only one void side [-Wpedantic]
924 | #define temp_free(f,p) (f->alloc.alloc_buffer ? 0 : free(p)) // OpenMPT
| ^
include/stb_vorbis/stb_vorbis.c:2922:4: note: in expansion of macro 'temp_free'
2922 | temp_free(f,buf2);
| ^~~~~
include/miniz/miniz.c: In function 'tinfl_decompress_mem_to_heap':
include/miniz/miniz.c:2894:1: warning: the frame size of 11056 bytes is larger than 4000 bytes [-Wframe-larger-than=]
2894 | }
| ^
include/miniz/miniz.c: In function 'tinfl_decompress_mem_to_mem':
include/miniz/miniz.c:2903:1: warning: the frame size of 11024 bytes is larger than 4000 bytes [-Wframe-larger-than=]
2903 | }
| ^
include/miniz/miniz.c: In function 'tinfl_decompress_mem_to_callback':
include/miniz/miniz.c:2932:1: warning: the frame size of 11072 bytes is larger than 4000 bytes [-Wframe-larger-than=]
2932 | }
| ^
include/miniz/miniz.c: In function 'mz_zip_reader_extract_to_mem_no_alloc.part.0':
include/miniz/miniz.c:4526:1: warning: the frame size of 12240 bytes is larger than 4000 bytes [-Wframe-larger-than=]
4526 | }
| ^
In file included from include/minimp3/minimp3.c:3:
include/minimp3/minimp3.h: In function 'mp3dec_decode_frame':
include/minimp3/minimp3.h:1778:1: warning: the frame size of 17472 bytes is larger than 4000 bytes [-Wframe-larger-than=]
1778 | }
| ^
include/miniz/miniz.c: In function 'mz_zip_reader_extract_to_callback.part.0':
include/miniz/miniz.c:4796:1: warning: the frame size of 12272 bytes is larger than 4000 bytes [-Wframe-larger-than=]
4796 | }
| ^
[CXX] openmpt123/openmpt123.cpp
include/miniz/miniz.c: In function 'mz_zip_writer_add_from_zip_reader':
include/miniz/miniz.c:7190:1: warning: the frame size of 5472 bytes is larger than 4000 bytes [-Wframe-larger-than=]
7190 | }
| ^
[GEN] bin/libopenmpt.pc
[AR] bin/libopenmpt.a
[LD] bin/openmpt123.exe
collect2: fatal error: cannot find 'ld'
compilation terminated.
make: *** [Makefile:1465: bin/openmpt123.exe] Error 1
[22:57:07][ERROR] Error [2] running process: 'make -j 4 CONFIG=mingw64-win64 TEST=0 SHARED_LIB=0 STATIC_LIB=1 EXAMPLES=0 MODERN=1' in '/home/u/Desktop/_working/workdir/x86_64/openmpt_git'
[22:57:07][ERROR] You can try deleting the product/dependency folder: '/home/u/Desktop/_working/workdir/x86_64/openmpt_git' and re-run the script

Steps To Reproduce

install mingw64
attempt to cross-compile using the commands shown in the log above

TagsNo tags attached.
Has the bug occurred in previous versions?no
Tested code revision (in case you know it)commit 23e289387f0bf5bf31d1b0caf97c6526756a9f25 fails

Activities

manx

manx

2020-08-21 06:46

administrator   ~0004423

I reproduced the build failure on Debian 10 (MinGW-w64 8.3).

CONFIG=mingw64-win64 TEST=0 SHARED_LIB=0 STATIC_LIB=1 EXAMPLES=0 MODERN=1

MODERN=1 implies, amongst other things, using the more modern GNU gold linker (-fuse-ld=gold). MinGW-w64 does not provide the gold linker, thus building will fail. This only worked previously because MODERN=1 did nothing for CONFIG=mingw64.... The intended outcome of the commit in question (r13468) was to normalize the warning options across different platforms using some kind of GCC. Platforms that do not have the gold linker cannot be built with MODERN=1.

MODERN=1 is mainly intended as a developer tool to catch more warnings earlier with more modern compilers. Just do not use it.

Issue History

Date Modified Username Field Change
2020-08-21 06:12 hydra3333 New Issue
2020-08-21 06:32 manx Assigned To => manx
2020-08-21 06:32 manx Status new => confirmed
2020-08-21 06:46 manx Status confirmed => closed
2020-08-21 06:46 manx Resolution open => no change required
2020-08-21 06:46 manx Fixed in Version => OpenMPT 1.30.00.* (old testing)
2020-08-21 06:46 manx Note Added: 0004423