Bug 239282 - devel/simgear: does not build with textproc/expat2-2.2.7
Summary: devel/simgear: does not build with textproc/expat2-2.2.7
Status: In Progress
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Ganael LAPLANCHE
URL:
Keywords:
Depends on:
Blocks: 238864
  Show dependency treegraph
 
Reported: 2019-07-18 14:27 UTC by Sergei Vyshenski
Modified: 2019-08-15 13:08 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (martymac)


Attachments
Patch to make Simgear use system expat (1.55 KB, patch)
2019-08-14 20:29 UTC, Ganael LAPLANCHE
no flags Details | Diff
Additional patch : make Flightgear detect new Simgear shared libs (995 bytes, patch)
2019-08-14 20:30 UTC, Ganael LAPLANCHE
no flags Details | Diff
Additional patch : make Flightgear-terragear detect new Simgear shared libs (962 bytes, patch)
2019-08-14 20:31 UTC, Ganael LAPLANCHE
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Vyshenski 2019-07-18 14:27:05 UTC
- devel/simgear fails during exp-run with a new version textproc/expat2-2.2.7
- See Bug 238864
- The reason maybe lies with the contradiction between two points:

1) simgear borrows many source files from very old versions of expat, see:
devel/simgear/work/simgear-2018.3.2/3rdparty/expat/*

2) simgear implicitly depends on the current version of textproc/expat2, see:
https://www.freebsd.org/cgi/ports.cgi?query=simgear&stype=all&sektion=all

Recently expat2 has been heavily modified, and at the moment quite a few improvements (beyond ver 2.2.7) are under way, see:
https://github.com/libexpat/libexpat

So no wander that the old code of expat (which is explicitly included with simgear) becomes not-compatible with the present code of expat2. More non-compatibilities are feasible with further versions of expat2.

Maybe maintainer could contact upstream about removing of the expat2's code from the sources of simgear, and instead introducing of explicit dependency from expat2? If not, then we most probably need new freebsd patches for the simgear port with each new version of expat2.
Comment 1 Ganael LAPLANCHE freebsd_committer 2019-07-18 20:42:24 UTC
Hello,

Thanks for your report. Unfortunately, I am unable to work on that PR at the moment (EONHOLIDAYS). Please, be patient, I'll try to contact Simgear devs when I am back, probably during the second half of august. Stay tuned... 

Thanks again, 
Best regards,
Ganael
Comment 2 Ganael LAPLANCHE freebsd_committer 2019-08-14 20:28:44 UTC
Hello Sergei,

Here is a patch that makes Simgear use system expat. It builds fine with current in-ports expat version. Can you tell me if it fixes the build with new version 2.2.7 ?

Using system expat implies building Simgear as a *dynamic* library, so additional patches are needed for Simgear consumer ports :

games/flightgear
games/flightgear-terragear

Those two ports cannot use the static libraries anymore, the must now detect the dynamic ones. You'll find attached (if needed) two additional patches to fix those ports.

Please, tell me if it fixes the build. If it is OK on your side, please note that I'll still have to test Flightgear built that way before committing those changes.

Best regards,
Ganael.
Comment 3 Ganael LAPLANCHE freebsd_committer 2019-08-14 20:29:58 UTC
Created attachment 206556 [details]
Patch to make Simgear use system expat

Patch to make Simgear use system expat
Comment 4 Ganael LAPLANCHE freebsd_committer 2019-08-14 20:30:54 UTC
Created attachment 206557 [details]
Additional patch : make Flightgear detect new Simgear shared libs

Additional patch : make Flightgear detect new Simgear shared libs
Comment 5 Ganael LAPLANCHE freebsd_committer 2019-08-14 20:31:45 UTC
Created attachment 206558 [details]
Additional patch : make Flightgear-terragear detect new Simgear shared libs

Additional patch : make Flightgear-terragear detect new Simgear shared libs
Comment 6 Sergei Vyshenski 2019-08-15 13:08:23 UTC
Hi Ganael,

Your patches fail to apply when procesed in the order as they are visible in the list of attachements above. Sorry.

Maybe you could compose a single patch instead of 3 patches.

Or maybe you could test your patches yourself with a new version of expat2, as presented in PR #238864.

All the best, 
Sergei