Open puckboy18 opened 8 months ago
Some new info. This problem only occurs on my EndeavorOS system. On the same machine running Manjaro the build works fine, even without petris' fix. Something is different, I'll do a bit of looking.
Not really, it's happening on ArchLinux too.
On my Manjaro system, /etc/makepkg.conf has the line: MAKEFLAGS="-j2" uncommented.
On my EndeavourOS system, the line in /etc/makepkg.conf:
is commented.
I uncommented the line on EndeavourOS, and the package builds without error. Maybe some kind of race or synchronization issue?
I had the same error and can confirm that uncommenting the line
MAKEFLAGS="-j2"
in /etc/makepkg.conf
did solve the problem.
Happened to me on Arch too, and changing the MAKEFLAGS
variable worked, FYI the -j
flag sets how many threads GCC uses. Coming from Gentoo where one wishes to minimise compilation times at all costs, setting this to the number of cores in you CPU is likely preferable. Gentoo does recommend ensuring that the number of jobs should not exceed half of your RAM in GB.
Hello all, I just pushed some changes to the PKGBUILD on how flightgear
is built, can anyone try a clean build and check to see if the error persists even when using -j>1
? I tested on my system and it works, but want to make sure I have at least one more datapoint, before I can close this issue.
Tested latest PKGBUILD on my EndeavourOS system. With MAKEFLAGS="-j2" it builds successfully. With #MAKEFLAGS commented out in /etc/makepkg.conf, I get the same build error as before. The man page for make implies that if -j is not set there's no limit on the number of jobs that run simultaneously.
Interesting. I tested mine with -j12
(i have a hex core machine). What is the thread count on your machine? Can you run the build with MAKEFLAGS="-j#of_your_cores"
?
Ok, I did some "Science", and I got interesting results.
First up, according to https://www.gnu.org/software/make/manual/html_node/Parallel.html:
If the ‘-j’ option is followed by an integer, this is the number of recipes to execute at once; this is called the number of job slots. If there is nothing looking like an integer after the ‘-j’ option, there is no limit on the number of job slots. The default number of job slots is one, which means serial execution (one thing at a time).
This means:
-j2
: limit to 2 jobs in parallel -j
without count: don't limit the number of jobs in parallel-j
option: serial execution (limit to 1 job in parallel)With that in mind, I tested on my dual core (4 threads) machine:
-j
: build failed with the same error message as before-j2
: build successful-j4
: build successful-j6
: build successful-j
: not a good idea, pc did not respond to input, other processes crashed, build not successful-j1
: build failed with the same error message as beforeSo, in conclusion, it seems the problem is not with parallel execution, but with serial execution_.
Thanks for that analysis, some very interesting results.
Can everyone running into this issue make sure they have the latest simgear
(2020.3.19-3 at the time of writing this) and then try.
Ok, I was using simgear 2020.3.19-1, now I installed simgear 2020.3.19-3, rebootet the system to be sure and commented out
#MAKEFLAGS="-j2"
Still it fails at the same step.
hmm I did the same and I was not able to reproduce the error @svemoe
You can try building in a clean chroot using paru.
Ok, I followed https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Classic_way
mkarchroot $CHROOT/root base-devel
makechrootpkg -c -r $CHROOT
makechrootpkg -c -r $CHROOT -I ../plib/plib-1.8.5-9-x86_64.pkg.tar.zst
makechrootpkg -c -r $CHROOT -I ../plib/plib-1.8.5-9-x86_64.pkg.tar.zst -I ../simgear/simgear-2020.3.19-3-x86_64.pkg.tar.zst
... And the build of flightgear still fails
It's a little bit different, I got to 41% instead of 38% And the message reads
make[2]: *** No rule to make target 'src/EmbeddedResources/FlightGear-resources.cxx', needed by 'src/Main/CMakeFiles/fgfs_autogen_timestamp_deps'. Stop.
make[1]: *** [CMakeFiles/Makefile2:2525: src/Main/CMakeFiles/fgfs_autogen_timestamp_deps.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
Instead of
make[2]: *** No rule to make target 'src/EmbeddedResources/FlightGear-resources.cxx', needed by 'src/Main/CMakeFiles/fgfs_autogen_timestamp_deps'. Stop.
make[1]: *** [CMakeFiles/Makefile2:3349: src/Main/CMakeFiles/fgfs_autogen_timestamp_deps.dir/all] Error 2
make: *** [Makefile:166: all] Error 2
... And the build of flightgear still fails
This is a huge bummer.
One thing we can do if you need the package, is to make a request on https://github.com/arch4edu/arch4edu for flightgear. Over there they will build AUR packages and host them for installation.
As for getting the package to install on your system, I'd still like you to try paru's chroot option as that has been the one I've had the most luck with.
For right now I guess you can install with -j>1
and maybe make an issue upstream honestly. https://sourceforge.net/p/flightgear/codetickets/
You could also see if the error persists in flightgear-git
.
Ok, installed paru, ran
paru -S --chroot flightgear
Still fails.
flightgear-git builds without error (without chroot using -j1)
hmm okay so then my best guess is there is an issue in the current release for serial compilation (maybe something wrong with include order?) that has been fixed in the latest development version. If we can figure out what commit is that fixed the error, we can patch the current release.
make[2]: No rule to make target 'src/EmbeddedResources/FlightGear-resources.cxx', needed by 'src/Main/CMakeFiles/fgfs_autogen_timestamp_deps'. Stop. make[1]: [CMakeFiles/Makefile2:3349: src/Main/CMakeFiles/fgfs_autogen_timestamp_deps.dir/all] Error 2 make: *** [Makefile:166: all] Error 2 ==> ERROR: A failure occurred in build().
Tried fix from petris on AUR page, didn't work for me.