acxz / flightgear-arch

A collection of Arch Linux PKGBUILDS for the Flightgear Simulator
3 stars 2 forks source link

[flightgear] No rule to make target 'src/EmbeddedResources/FlightGear-resources.cxx' #10

Open puckboy18 opened 8 months ago

puckboy18 commented 8 months ago

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.

puckboy18 commented 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.

gmontamat commented 8 months ago

Not really, it's happening on ArchLinux too.

puckboy18 commented 8 months ago

On my Manjaro system, /etc/makepkg.conf has the line: MAKEFLAGS="-j2" uncommented.

On my EndeavourOS system, the line in /etc/makepkg.conf:

MAKEFLAGS="-j2"

is commented.

I uncommented the line on EndeavourOS, and the package builds without error. Maybe some kind of race or synchronization issue?

svemoe commented 8 months ago

I had the same error and can confirm that uncommenting the line MAKEFLAGS="-j2" in /etc/makepkg.conf did solve the problem.

mppbtw commented 8 months ago

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.

acxz commented 8 months ago

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.

puckboy18 commented 8 months ago

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.

acxz commented 8 months ago

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"?

svemoe commented 8 months ago

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:

With that in mind, I tested on my dual core (4 threads) machine:

So, in conclusion, it seems the problem is not with parallel execution, but with serial execution_.

acxz commented 8 months ago

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.

svemoe commented 8 months ago

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.

acxz commented 8 months ago

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.

svemoe commented 8 months ago

Ok, I followed https://wiki.archlinux.org/title/DeveloperWiki:Building_in_a_clean_chroot#Classic_way

... 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
acxz commented 8 months ago

... 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.

svemoe commented 8 months ago

Ok, installed paru, ran

paru -S --chroot flightgear

Still fails.

flightgear-git builds without error (without chroot using -j1)

acxz commented 8 months ago

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.