Bug#813452: [Pkg-pascal-devel] Bug#813452: fpc-3.0 regression in armhf and armel architectures
Hi Paul, On Sat, 2016-02-27 at 13:45 +0100, Paul Gevers wrote: > Hi Gianfranco, > > On 27-02-16 13:11, Gianfranco Costamagna wrote: > > confirmed, with 3.1.1 on trunk I built it successfully. > > Great. > > > Do you think you can backport a patch? > > Once the required code has been found. Abou requested help from upstream > to identify it. > > > I also tried to build with the current fpc and no fPIC for the pascal part, > > and the build is successful. > > > > actually fPIC was broken also before, according to the Cmake file > > if(${CMAKE_Pascal_COMPILER_VERSION} VERSION_GREATER 2.7 OR > > ${CMAKE_TARGET_ARCHITECTURES} MATCHES "x86_64" OR > > ${CMAKE_TARGET_ARCHITECTURES} MATCHES "i386") > > add_flag_append(CMAKE_Pascal_FLAGS "-fPIC") > > endif() > > > > > > so, disabling it again is not a "real" regression :) > > Hmm, that also means we can lower the severity of this bug (no > regression) and have it migrate to testing, agreed? I would leave this > bug as important, but still have fpc 3 migrate to testing. Is anybody > objecting? > > Proposal: > control: retitle -1 fpc can not build -fPIC with -O2 on arm* > control: severity -1 important > control: tags -1 fixed-upstream I agree -- Cheers, Abou Al Montacir
Bug#813452: [Pkg-pascal-devel] Bug#813452: fpc-3.0 regression in armhf and armel architectures
Hi Paul, On Wed, 2016-02-17 at 22:26 +0100, Paul Gevers wrote: > Hmm, I was a tiny little bit wrong earlier. > > I modified hedgewars a tiny bit (patch attached) and build in on > debomatic¹. You can see that the failing line reads: > "Lua test file specified: /<>/tests/lua/hellfire_burns.lua" ... > Anyways, it now fails for an access violation. I don't like this at all, > but it is hard to say if this is a fpc error or hedgewars'. I've tried some simpler code and it looks like the compilation options used by hedgewars cause the issue. I don't know if this is normal or not but at least we know now that it is not an issue in the code itself but rather in the compilation flags. I'm copying FPC core in case some one can help with the impact of the used compilation flags. Here are my experimentation: I first created very small programs: (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux- gnueabi/hedgewars$ cat test1.pas program test; begin WriteLn('Hello'); end. (sid _armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux- gnueabi/hedgewars$ cat test2.pas program test; begin WriteLn(stdout, 'Hello'); end. (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux- gnueabi/hedgewars$ I first compile using no special flags and both programs execute well: (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc test1 Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling test1.pas Assembling test Linking test1 /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? 4 lines compiled, 0.3 sec (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test1 Hello (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc test2 Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling test2.pas Assembling test Linking test2 /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? 4 lines compiled, 0.3 sec (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test2 Hello Now, we use a subset of compilation flags from hedgewars and we can just reproduce the issue on second program but not the first one: (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -FU/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars/CMakeFiles/hwengine.dir -k-rpath -k'\$ORIGIN/../lib/:\$ORIGIN/:/usr/lib/hedgewars/lib/' -FD/usr/bin -Cs200 -fPIC -Fl/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/bin -k-L/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -XLAlua=lua5.1 -Fl/usr/lib/arm-linux-gnueabi/libphysfs.so -O2 -g -gl -gp -dUSE_VIDEO_RECORDING -dPNG_SCREENSHOTS -dSDL_MIXER_NEWER -dSDL_IMAGE_NEWER -dDEBUGFILE test1 Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling test1.pas Assembling test Linking test1 /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? 4 lines compiled, 0.3 sec (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test1 Hello (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -FU/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars/CMakeFiles/hwengine.dir -k-rpath -k'\$ORIGIN/../lib/:\$ORIGIN/:/usr/lib/hedgewars/lib/' -FD/usr/bin -Cs200 -fPIC -Fl/home/abou/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/bin -k-L/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -Fl/usr/lib/arm-linux-gnueabi -XLAlua=lua5.1 -Fl/usr/lib/arm-linux-gnueabi/libphysfs.so -O2 -g -gl -gp -dUSE_VIDEO_RECORDING -dPNG_SCREENSHOTS -dSDL_MIXER_NEWER -dSDL_IMAGE_NEWER -dDEBUGFILE test2 Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm Copyright (c) 1993-2015 by Florian Klaempfl and others Target OS: Linux for ARMEL Compiling test2.pas Assembling test Linking test2 /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T? 4 lines compiled, 0.3 sec (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ ./test2 Runtime error 103 at $000101C8 $000101C8 $main, line 3 of test2.pas It is not clear for me why RTE 103 is thrown, in the second case but not in the first one. I'd expect either both work or neither. Also I don't see what is the impact of the compilation flags that are used. Maybe I should perform more experimentations in order to find a smaller subset. but that will be enough for tonight! -- Cheers, Abou Al Montacir signature.asc Description: This is a digitally signed message part
Bug#813452: [Pkg-pascal-devel] Bug#813452: fpc-3.0 regression in armhf and armel architectures
Hi Abou, >I could notice in the build log on sid the following warnings: >hwengine.pas(626) Warning: "crtbeginS.o" not found, this will probably cause a >linking failure >hwengine.pas(626) Warning: "crtendS.o" not found, this will probably cause a >linking failure >On the other hand these files seem to belong to libgcc-5-dev on my system >$dpkg -S /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o >libgcc-5-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o >Can you please check if they are availables on the arm box you are using? > sure: ls /usr/lib/gcc/arm-linux-gnueabihf/5/crt*S.o -l -rw-r--r-- 1 root root 2424 Feb 6 17:23 /usr/lib/gcc/arm-linux-gnueabihf/5/crtbeginS.o -rw-r--r-- 1 root root 1100 Feb 6 17:23 /usr/lib/gcc/arm-linux-gnueabihf/5/crtendS.o (I'm doing the work under a qemu arm environment, but it shouldn't make any difference) to reproduce: pbuilder-dist sid armhf create pbuilder-dist sid armhf login install vim ubuntu-dev-tools wget liburi-perl pull-debian-source hedgewars dpkg-buildpackage it :) >The reason I think these warnings are related is that stdin/stdout are open by >parent process so may be related to the C code initialization. > >I can probably be completely wrong, but let's check this first.-- I'm not sure if my answer helps actually, but I hope I did all the requested stuff correctly. thanks a lot! Gianfranco
Bug#813452: [Pkg-pascal-devel] Bug#813452: fpc-3.0 regression in armhf and armel architectures
Hi Gianfranco, On Tue, 2016-02-02 at 08:09 +, Gianfranco Costamagna wrote: > Source: fpc > Version: 3.0.0+dfsg-2 > Severity: serious > > > Hi, I open this ticket to discuss with you the regression I found on armel and > armhf platforms > in my hedgewars upload yesterday. > > I checked in a stretch clean pbuilder environment (both logs are attached), > and the testsuite runs correctly, > the only sensible change has been the fpc upgrade, and this is the reason for > this bug report. > > Test project /build/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabihf > Start 1: drillrockets_drill.lua > 1/6 Test #1: drillrockets_drill.lua ...***Failed0.92 sec > An unhandled exception occurred at $000C0300: > EInOutError: File not open > $000C0300 WriteLn, line 467 of /build/hedgewars-0.9.22- > dfsg/hedgewars/uUtils.pas > > > the strange thing is that the affected line seems rather simple: > procedure WriteLn(var f: textfile; s: shortstring); > begin > system.writeln(f, s) > end; > > > and the testsuite works perfectly on every other architecture, so I presume > this is an fpc specific regression. > (I can also ask to remove the hedgewars arm* architectures if needed) I could notice in the build log on sid the following warnings: hwengine.pas(626) Warning: "crtbeginS.o" not found, this will probably cause a linking failure hwen gine.pas(626) Warning: "crtendS.o" not found, this will probably cause a linking failure On the other hand these files seem to belong to libgcc-5-dev on my system $dpkg -S /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o libgcc-5-dev:amd64: /usr/lib/gcc/x86_64-linux-gnu/5/crtbeginS.o Can you please check if they are availables on the arm box you are using? The reason I think these warnings are related is that stdin/stdout are open by parent process so may be related to the C code initialization. I can probably be completely wrong, but let's check this first. -- Cheers, Abou Al Montacir signature.asc Description: This is a digitally signed message part
Bug#813452: [Pkg-pascal-devel] Bug#813452: fpc-3.0 regression in armhf and armel architectures
Hi Gianfranco, Glad to support such nice game as hedgewars. On Tue, 2016-02-02 at 08:09 +, Gianfranco Costamagna wrote: > Source: fpc > Version: 3.0.0+dfsg-2 > Severity: serious > > Hi, I open this ticket to discuss with you the regression I found on armel > and armhf platforms > in my hedgewars upload yesterday. > Was not aware that hedgewars was build depending on FPC. Nice to know so that next time we can test before uploading a major release. > I checked in a stretch clean pbuilder environment (both logs are attached), > and the testsuite runs correctly, > the only sensible change has been the fpc upgrade, and this is the reason for > this bug report. > > Test project /build/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabihf > Start 1: drillrockets_drill.lua > 1/6 Test #1: drillrockets_drill.lua ...***Failed0.92 sec > An unhandled exception occurred at $000C0300: > EInOutError: File not open > $000C0300 WriteLn, line 467 of > /build/hedgewars-0.9.22-dfsg/hedgewars/uUtils.pas > Fine not open? Are you sure the Reset/ReWrite/... open function did not return an error? Maybe check IoResult after opening the file. Anyway this is strange as it would not worked before unless the OS backend open function use is not the same as in previous version. Can you please provide code snippet about when the file was open, which mode and so on? > the strange thing is that the affected line seems rather simple: > procedure WriteLn(var f: textfile; s: shortstring); > begin > system.writeln(f, s) > end; > I'm almost sure this is not the faulty code, but something before that made the file not correctly open. > and the testsuite works perfectly on every other architecture, so I presume > this is an fpc specific regression. > (I can also ask to remove the hedgewars arm* architectures if needed) I don't think we should remove any package form any arch, just be patient and fix the bug. -- Cheers, Abou Al Montacir signature.asc Description: This is a digitally signed message part