Bug 239282

Summary: devel/simgear: does not build with textproc/expat2-2.2.7
Product: Ports & Packages Reporter: Sergei Vyshenski <svysh.fbsd>
Component: Individual Port(s)Assignee: Ganael LAPLANCHE <martymac>
Status: Closed FIXED    
Severity: Affects Many People CC: svysh.fbsd
Priority: --- Flags: bugzilla: maintainer-feedback? (martymac)
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 238864    
Attachments:
Description Flags
Patch to make Simgear use system expat
none
Additional patch : make Flightgear detect new Simgear shared libs
none
Additional patch : make Flightgear-terragear detect new Simgear shared libs none

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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 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
Comment 7 Sergei Vyshenski 2019-08-19 19:48:07 UTC
Hi Ganael,

As of devel/simgear port, I tried by hand to introduce ideas expressed in your patches, and acting together with the version expat2-2.2.7, got:

====> Running Q/A tests (stage-qa)
Error: /usr/local/lib/libSimGearCore.so.2018.3.2 is linked to /usr/local/lib/libcurl.so.4 from ftp/curl but it is not declared as a dependency
Warning: you need LIB_DEPENDS+=libcurl.so:ftp/curl

Besides this, "poudriere testport" was happy. Which is an evident progress. Congratulations.

Your patches still apply with errors here to the fresh ports tree.

All the best, 
Sergei
Comment 8 Sergei Vyshenski 2019-08-19 19:49:29 UTC
That was tested at 12.0-RELEASE-p9.
Comment 9 commit-hook freebsd_committer freebsd_triage 2019-08-20 10:56:25 UTC
A commit references this bug:

Author: martymac
Date: Tue Aug 20 10:55:51 UTC 2019
New revision: 509420
URL: https://svnweb.freebsd.org/changeset/ports/509420

Log:
  devel/simgear: Use expat from ports instead of internal version

  That prepares the port for the upcoming update of textproc/expat2.

  As a consequence, Simgear is now provided as a shared library (only). That
  commit chases dependencies to Simgear and fixes them for dependent ports [1].

  PR:		239282
  Submitted by:	Sergei Vyshenski <svysh.fbsd@gmail.com>
  Approved by:	portmgr blanket [1]

Changes:
  head/devel/simgear/Makefile
  head/devel/simgear/pkg-plist
  head/games/flightgear/Makefile
  head/games/flightgear-terragear/Makefile
Comment 10 Ganael LAPLANCHE freebsd_committer freebsd_triage 2019-08-20 10:59:36 UTC
Hello Sergei,

I have committed the first set of patches, thanks for your feedback!

I'll now see if I can reproduce the missing dependency problem.

Best regards,

Ganael.
Comment 11 commit-hook freebsd_committer freebsd_triage 2019-08-20 16:26:52 UTC
A commit references this bug:

Author: martymac
Date: Tue Aug 20 16:26:31 UTC 2019
New revision: 509432
URL: https://svnweb.freebsd.org/changeset/ports/509432

Log:
  Add forgotten dependencies and USE_LDCONFIG following r509420

  PR:		239282
  Submitted by:	Sergei Vyshenski <svysh.fbsd@gmail.com>

Changes:
  head/devel/simgear/Makefile
  head/games/flightgear/Makefile
Comment 12 Ganael LAPLANCHE freebsd_committer freebsd_triage 2019-08-20 16:27:30 UTC
Oops, it seems like I also forgot a few things in my previous commit.

This is now fixed, thanks!