Bug 223648 - [NEW PORT] games/flightgear-terragear Tools for building scenery for the FlightGear project
Summary: [NEW PORT] games/flightgear-terragear Tools for building scenery for the Flig...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Torsten Zuehlsdorff
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-11-13 12:51 UTC by Michael Danilov
Modified: 2018-04-05 08:52 UTC (History)
1 user (show)

See Also:


Attachments
games/flightgear-terragear (6.47 KB, patch)
2017-11-13 12:51 UTC, Michael Danilov
no flags Details | Diff
portlint -AC (145 bytes, text/plain)
2017-11-13 12:52 UTC, Michael Danilov
no flags Details
poudriere testport (127.92 KB, text/plain)
2017-11-13 12:52 UTC, Michael Danilov
no flags Details
games/flightgear-terragear (6.21 KB, patch)
2017-11-23 14:29 UTC, Michael Danilov
no flags Details | Diff
Build log with error (130.94 KB, text/x-log)
2017-11-24 14:47 UTC, Torsten Zuehlsdorff
no flags Details
Build log with error for 10.3 i386 (139.61 KB, text/x-log)
2018-01-30 09:00 UTC, Torsten Zuehlsdorff
no flags Details
Build log with error for 10.3 amd64 (109.38 KB, text/x-log)
2018-01-30 09:01 UTC, Torsten Zuehlsdorff
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Danilov 2017-11-13 12:51:45 UTC
Created attachment 187960 [details]
games/flightgear-terragear

TerraGear is a collection of tools for building scenery for the
FlightGear project.  Generally, the process is done in two steps:

  1. Preprocess the original raw data.  This chops up the data into
     the FG tiling scheme and saves it in a simple, intermediate
     format.

  2. Collect all the different pieces of intermediate data and
     assemble them into a 3d model of the terrain.

WWW: https://github.com/FlightGear/terragear
Comment 1 Michael Danilov 2017-11-13 12:52:16 UTC
Created attachment 187961 [details]
portlint -AC
Comment 2 Michael Danilov 2017-11-13 12:52:49 UTC
Created attachment 187962 [details]
poudriere testport
Comment 3 Torsten Zuehlsdorff freebsd_committer 2017-11-21 13:43:49 UTC
Hello Michael,

the port looks fine. I just have an issue, with the PORTVERSION. The WWW in pkg-descr points me to https://github.com/FlightGear/terragear.

But there the only release i found is from 2012. I could not find a release 20171007. Also you refer to a single commit. Can you explain why you choose this way?

Greetings,
Torsten
Comment 4 Michael Danilov 2017-11-21 15:39:07 UTC
Good evening,

Their release scheme is confusing. It seems that releases just mark the features that have stabilised in the unstable master branch, which has the parts that output the 3d model commented out.

One should use the "scenery/ws2.0" branch instead, as mentioned here:

http://wiki.flightgear.org/TerraGear

By the way, do we have the tools for SourceForge Git? Is it ok to use this mirror on github?

Cheers,
Mike
Comment 5 Torsten Zuehlsdorff freebsd_committer 2017-11-23 11:44:28 UTC
Aloha Michael,

Okay, that *is* confusing. :D

I'm not aware of SourceForge Git support, but using the Github-Mirror is just fine.

So if you haven't any adjustments based on the current state: should i take the port like it is?

Greetings,
Torsten
Comment 6 Michael Danilov 2017-11-23 13:31:32 UTC
Hi,

Yes, I think it's ready.

Thank you,
Mike
Comment 7 Torsten Zuehlsdorff freebsd_committer 2017-11-23 13:54:50 UTC
Aloha Michael,

Fine, i took a closer look at it. Some issues:
- The order of *_DEPENDS must be: BUILD, LIB, RUN
- There must not be an newline between the DEPENDS, otherwise portlint complains
- please remove the FIXME comment

This rest looks fine. I will put it into my build-test farm for further inspection :)

Greetings,
Torsten
Comment 8 Michael Danilov 2017-11-23 14:29:01 UTC
Created attachment 188215 [details]
games/flightgear-terragear

Done.

We might have to follow the compiler version of simgear, like flightgear does -- but I don't know at all how to fix that conditional. It's direct copypaste from flightgear, looks completely valid, but it doesn't work...
Comment 9 Torsten Zuehlsdorff freebsd_committer 2017-11-24 08:37:38 UTC
Aloha Michael,

there is an issue: it does not build on FreeBSD 10.3 i386 nor amd64. Its long error log. Can you please investigate?

All other versions are fine. 

Greetings,
Torsten
Comment 10 Michael Danilov 2017-11-24 14:07:39 UTC
Evening,

I'm sorry, I don't have access to a machine with 10. Could you please attach the log (or the parts with the errors) of the failed build?

And my first guess would be the compiler version. Maybe we should force CLANG 4.0.

Cheers,
Mike
Comment 11 Torsten Zuehlsdorff freebsd_committer 2017-11-24 14:47:47 UTC
Created attachment 188241 [details]
Build log with error

Hello Michael,

attached the error log. :) Hope you can work with it!

Greetings,
Torsten
Comment 12 Michael Danilov 2017-11-24 15:20:00 UTC
A bunch of "undefined reference to `__cxa_thread_atexit'". The few results google has suggest they got something to do with C++11 support. Came up with this plan:

1. Make sure it's built with the same compiler as simgear.
2. Try adding these to the Makefile, only one each time and then all 3 if they all fail.
 2.1. USE_CXXSTD= c++11
 2.2. CXXFLAGS+= -std=c++11
 2.3. LDFLAGS+= -lsupc++ make

I think "2.1" should be enough, because it seems the issue has already been fixed and we just should let the system know it's dealing with C++11:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192320
Comment 13 Torsten Zuehlsdorff freebsd_committer 2017-12-05 16:48:14 UTC
I did test all options but nothing worked. But i'm not sure if i did it right, since i'm having not much experience with such ports. :(

If you have something for me to test, i can happily test it.
Comment 14 Michael Danilov 2017-12-05 17:06:36 UTC
So far I could suggest attaching the build log for each of the 3 (no need for combinations) if that's not too much work.

I think I will have to re-read the package's docs, maybe they mention C++11 or i386.
Comment 15 Torsten Zuehlsdorff freebsd_committer 2018-01-30 09:00:31 UTC
Created attachment 190191 [details]
Build log with error for 10.3 i386
Comment 16 Torsten Zuehlsdorff freebsd_committer 2018-01-30 09:01:00 UTC
Created attachment 190192 [details]
Build log with error for 10.3 amd64
Comment 17 Torsten Zuehlsdorff freebsd_committer 2018-01-30 09:03:14 UTC
(In reply to Michael Danilov from comment #14)

> So far I could suggest attaching the build log for each of the 3 
> (no need for combinations) if that's not too much work.

Sorry it took so long. But now i'm back again picking this up. The build logs are from yesterday. 

If you can't get them build i would suggest to mark them broken for 10.3. The port builds on 10.4 and the support for 10.3 ends in 3 months. Of course it would be great to have it for 10.3 but its also fine to focus on other things.

Greetings,
Torsten
Comment 18 Michael Danilov 2018-02-14 13:41:26 UTC
Hi,

Sorry about the delay, I thought I had replied. Does adding

LDFLAGS+=-lsupc++

as advised in

https://stackoverflow.com/questions/29322666/undefined-reference-to-cxa-thread-atexitcxxabi-when-compiling-with-libc

make it work? If not, I'm afraid I will either have to USE_GCC for 10.3.

I think this has to to something with clang version? Do 10.3 and 10.4 have different clang?
Comment 19 Torsten Zuehlsdorff freebsd_committer 2018-02-22 13:28:23 UTC
This doesn't help sadly.

Also the Clang versions do not differ. In 10.3 we get:
===>  Performing in-source build
/bin/mkdir -p /wrkdirs/usr/ports/games/flightgear-terragear/work/terragear-5b5e5fc
-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1

And in 10.4 we get:

===>  Performing in-source build
/bin/mkdir -p /wrkdirs/usr/ports/games/flightgear-terragear/work/terragear-5b5e5fc
-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1
Comment 20 Torsten Zuehlsdorff freebsd_committer 2018-04-03 13:43:36 UTC
FreeBSD 10.3 support has ended. Would you mind to update the PR a last time? Than i will commit it.
Comment 21 Michael Danilov 2018-04-03 14:31:36 UTC
Hi,

But does it build on 10.4? What should I change?

Cheers,
Mike
Comment 22 Torsten Zuehlsdorff freebsd_committer 2018-04-03 14:36:20 UTC
Hi Mike,

> But does it build on 10.4? 

Yes.

> What should I change?

Rebase. And i think UID and GID needs an update ;)

The rest was fine.

Greetings,
Torsten
Comment 23 Michael Danilov 2018-04-03 14:54:46 UTC
Hm. The new patch I generate seems the same as that we have?
Comment 24 commit-hook freebsd_committer 2018-04-05 08:50:45 UTC
A commit references this bug:

Author: tz
Date: Thu Apr  5 08:50:41 UTC 2018
New revision: 466542
URL: https://svnweb.freebsd.org/changeset/ports/466542

Log:
  New port: games/flightgear-terragear

  TerraGear is a collection of tools for building scenery for the
  FlightGear project.  Generally, the process is done in two steps:

    1. Preprocess the original raw data.  This chops up the data into
       the FG tiling scheme and saves it in a simple, intermediate
       format.

    2. Collect all the different pieces of intermediate data and
       assemble them into a 3d model of the terrain.

  WWW: https://github.com/FlightGear/terragear

  PR:           223648
  Submitted by: Michael Danilov <mike.d.ft402@gmail.com>

Changes:
  head/games/Makefile
  head/games/flightgear-terragear/
  head/games/flightgear-terragear/Makefile
  head/games/flightgear-terragear/distinfo
  head/games/flightgear-terragear/files/
  head/games/flightgear-terragear/files/patch-tg_misc.cxx
  head/games/flightgear-terragear/files/patch-tg_shapefile.cxx
  head/games/flightgear-terragear/pkg-descr
  head/games/flightgear-terragear/pkg-plist
Comment 25 Torsten Zuehlsdorff freebsd_committer 2018-04-05 08:52:32 UTC
(In reply to Michael Danilov from comment #23)

> Hm. The new patch I generate seems the same as that we have?

You are right. I mixed up PRs.

After testing the patch again i can confirm everything is fine. Its finally committed! :)

Thanks for your work and patience!

Greetings,
Torsten