Bug 211921 - cad/brlcad: cleanup some build issues and pet portlint.
Summary: cad/brlcad: cleanup some build issues and pet portlint.
Status: Closed Feedback Timeout
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Rene Ladan
URL:
Keywords: needs-patch, needs-qa, patch
Depends on: 215617
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-17 00:28 UTC by Pedro F. Giffuni
Modified: 2019-05-26 21:34 UTC (History)
6 users (show)

See Also:
rene: maintainer-feedback? (erik)


Attachments
Update to 7.26.0 (114.27 KB, patch)
2016-08-17 00:28 UTC, Pedro F. Giffuni
no flags Details | Diff
Update to 7.26.0 (113.25 KB, patch)
2016-09-08 16:09 UTC, Pedro F. Giffuni
no flags Details | Diff
Update to 7.26.0 - should build if libuuid is not present. (113.28 KB, patch)
2017-03-12 23:27 UTC, Pedro F. Giffuni
no flags Details | Diff
portlint issues (1.37 KB, patch)
2018-01-06 15:23 UTC, Pedro F. Giffuni
no flags Details | Diff
portlint issues (1.36 KB, patch)
2018-01-06 15:42 UTC, Pedro F. Giffuni
no flags Details | Diff
reproducable in poudriere (291.04 KB, patch)
2018-01-06 21:15 UTC, Rene Ladan
no flags Details | Diff
with working mged.sh (291.25 KB, patch)
2018-01-06 21:33 UTC, Rene Ladan
no flags Details | Diff
manual pages compressed (293.33 KB, patch)
2018-01-07 12:33 UTC, Rene Ladan
no flags Details | Diff
svn-diff-brlcad_2018_03_02 (74.78 KB, patch)
2018-03-02 17:40 UTC, Walter Schwarzenfeld
no flags Details | Diff
cmake benchmark and regression test (29.50 KB, application/x-tar)
2018-03-03 15:12 UTC, bye
no flags Details
7.26.4 brlcad update (121.53 KB, patch)
2018-03-04 04:41 UTC, bye
no flags Details | Diff
brlcad fix (236.65 KB, patch)
2018-07-09 06:25 UTC, bye
no flags Details | Diff
Fix of LLVM bug introduced somewhere (2.66 KB, patch)
2018-08-28 14:00 UTC, bye
no flags Details | Diff
portlint ACM passes (147.12 KB, patch)
2018-09-25 05:09 UTC, bye
no flags Details | Diff
brlcad fix as .shar file (180.41 KB, text/plain)
2018-09-29 05:15 UTC, bye
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro F. Giffuni freebsd_committer 2016-08-17 00:28:46 UTC
Created attachment 173760 [details]
Update to 7.26.0

Update to the latest version. For a list of enhancements see:

https://sourceforge.net/p/brlcad/code/HEAD/tree/brlcad/trunk/CHANGES

All our local changes have been upstreamed.

Also take the chance to do some cleanups on the port to satisfy stage-qa, and add the license

Huge thanks to Christopher Sean Morrison from brlcad.org for help solving the issues.
Comment 1 Pedro F. Giffuni freebsd_committer 2016-08-17 00:56:59 UTC
FYI I just noticed this doesn't build if misc/e2fsprogs-libuuid is installed. I have reported the issue upstream.
Comment 2 Erik Greenwald 2016-09-07 17:25:16 UTC
Looks good to me. Thanks, Pedro!
Comment 3 Pedro F. Giffuni freebsd_committer 2016-09-08 15:42:30 UTC
For the record ...

I am testing a patch to use 
CMAKE_INSTALL_PREFIX= ${PREFIX}/${PORTNAME}

instead of the ugly PREFIX hack we are doing now.
Comment 4 Pedro F. Giffuni freebsd_committer 2016-09-08 16:09:21 UTC
Created attachment 174537 [details]
Update to 7.26.0

CMAKE_INSTALL_PREFIX is much cleaner so I include it in this patch:

        Prefix: /usr/local/brlcad
      Binaries: /usr/local/brlcad/bin
     Libraries: /usr/local/brlcad/lib
  Manual pages: /usr/local/brlcad/share/man
Data resources: /usr/local/brlcad/share

(Yes the man pages are still not in a place where they may conform to hier(7).)

Unfortunately I still get uuid build conflicts and upstream didn't really fixed them. We are stuck :(.
Comment 5 VK freebsd_triage 2016-11-12 23:41:24 UTC
Pedro, want to take this issue?
Comment 6 Pedro F. Giffuni freebsd_committer 2016-11-13 13:15:09 UTC
(In reply to Vladimir Krstulja from comment #5)

No, sorry ... I am currently AFK and this port still needs some work upstream.
Comment 7 John Marino freebsd_committer 2017-02-09 01:51:31 UTC
brlcad has been marked for removal on April 1 due to the reliance on urt (librle.so:graphics/urt)

How is it that brlcad needs a library that isn't available and hasn't had a release since 1996?

Is there a bundled version?  Does brlcad provide a copy in any way?

Somebody needs to get a move on if they want to save this port, and they need to figure out how to build it without urt.
Comment 8 Pedro F. Giffuni freebsd_committer 2017-02-09 03:20:31 UTC
(In reply to John Marino from comment #7)

BRLCad has it's own bundled version of URT. I recall both are mostly in sync since I submitted our URT patches to BRLCad as well.

There is, however a patch to save URT from deprecation (PR 215617), since it is also needed for Rayshade.
Comment 9 Pedro F. Giffuni freebsd_committer 2017-03-12 23:27:35 UTC
Created attachment 180759 [details]
Update to 7.26.0 - should build if libuuid is not present.

(I spent a while trying to use the included URT in the previous port .. and failed).

Unfortunately this port needs a lot of work: if libuuid is installed it won't build due to a configuration error in this version. libuuid is used by KDE so I can't build it locally but Dr. Poudriere should.
Comment 10 Rene Ladan freebsd_committer 2017-03-20 22:16:54 UTC
I get an error that mged.sh (from FILESDIR) cannot be found in the post-install target, I tried this quick hack but it fails too:

(no pre-install target)
post-install:
        ${INSTALL_SCRIPT} ${FILESDIR}/mged.sh ${STAGEDIR}${PREFIX}/bin/mged.sh
        ${REINPLACE_CMD} -e 's+%%BRLCAD_ROOT%%+${PREFIX}+g;' ${STAGEDIR}${PREFIX}/mged.sh
        ${LN} -s ${PREFIX}/bin/mged.sh ${STAGEDIR}${PREFIX}/bin/mged.sh
Comment 11 Pedro F. Giffuni freebsd_committer 2017-03-21 03:39:41 UTC
(In reply to Rene Ladan from comment #10)
...
This is very strange because we never touched the script for either update: neither on the Makefile nor in the pkg-plist!
Comment 12 Pedro F. Giffuni freebsd_committer 2017-03-22 03:18:43 UTC
(In reply to Pedro F. Giffuni from comment #11)
Let's close this PR for now. I am busy but I better should try to figure out with upstream what is wrong.
I'll prepare a new update when I am ready.
Comment 13 Rene Ladan freebsd_committer 2017-04-28 15:11:13 UTC
I have un-expired the port for now in commit r439613
Comment 14 Tobias C. Berner freebsd_committer 2017-05-17 20:08:38 UTC
Don't forget to also add:
USES=shebangfix
SHEBANG_FILES=  src/conv/intaval-g.py
Comment 15 Rene Ladan freebsd_committer 2018-01-06 11:44:25 UTC
Any updates on this?
Comment 16 Pedro F. Giffuni freebsd_committer 2018-01-06 13:58:54 UTC
(In reply to Rene Ladan from comment #15)

Sorry for the long delay.

Upstream claims they fixed the issue but I haven't confirmed and they haven't released a new version.
I will submit an small update to the existing port later today.
Comment 17 Pedro F. Giffuni freebsd_committer 2018-01-06 15:23:49 UTC
Created attachment 189460 [details]
portlint issues

Hmm .. there *is* a new version to test, but for now I just think we should clean some portlint and general build issues.

The port has some patches that we should cleanup in a future update but for now cleaning the Makefile will make things easier.
Comment 18 Pedro F. Giffuni freebsd_committer 2018-01-06 15:37:43 UTC
Lets be less ambitious: I only want to clean this up and I will submit a separate PR when an update is ready.
Comment 19 Pedro F. Giffuni freebsd_committer 2018-01-06 15:42:40 UTC
Created attachment 189461 [details]
portlint issues

Minimalistic change.

The port appears to now be broken due to a boost update so I will have to work on an update (in another PR).
Comment 20 Rene Ladan freebsd_committer 2018-01-06 21:15:57 UTC
Created attachment 189472 [details]
reproducable in poudriere

I prepared a diff now that I can build brlcad locally in poudriere (no custom options/settings/environments). The diff is huge because of the replacing PREFIX by CMAKE_INSTALL_PREFIX, which caused every line in pkg-plist to change.
Comment 21 Rene Ladan freebsd_committer 2018-01-06 21:33:10 UTC
Created attachment 189476 [details]
with working mged.sh
Comment 22 Rene Ladan freebsd_committer 2018-01-06 22:06:57 UTC
FYI, the latest version is now 7.26.4
Comment 23 Pedro F. Giffuni freebsd_committer 2018-01-07 04:46:26 UTC
(In reply to Rene Ladan from comment #21)
Thanks for finishing the cleanup! I was sort of sick this morning and couldn't spend much time on it.

For the record:
- The old PREFIX hack was an old trick that I think I introduced when the port was still using configure. It had to be cleaned up.
- There are still some ugly workarounds for older cmake that will have to be looked at for the next update.
- The big problem with this port is that it needs a custom tcl/tk.
- Upstream is very freeBSD friendly.

I will wait until this is committed before working on an upgrade: I don't want to add more complexity to the current update., and I wouldn't like to stop anyone from working on it either.
Comment 24 Rene Ladan freebsd_committer 2018-01-07 10:36:48 UTC
Other things to do:
- install manual pages in the correct location (PREFIX/man instead of PREFIX/share/man) and gzip them all
- regenerate patches to have them correctly named (perhaps together with a version update)
Comment 25 Rene Ladan freebsd_committer 2018-01-07 12:33:40 UTC
Created attachment 189489 [details]
manual pages compressed
Comment 26 commit-hook freebsd_committer 2018-01-21 12:10:34 UTC
A commit references this bug:

Author: rene
Date: Sun Jan 21 12:10:11 UTC 2018
New revision: 459598
URL: https://svnweb.freebsd.org/changeset/ports/459598

Log:
  cad/brlcad: miscellaneous improvements

  - add LICENSE (LGPL21)
  - fix stage-qa
  - pet portlint
  - clean up PREFIX, regenerate pkg-plist consequently
  - clean up other Makefile variables
  - bump PORTREVISION

  PR:		211921 (partially)
  Submitted by:	pfg@
  Approved by:	maintainer timeout

Changes:
  head/cad/brlcad/Makefile
  head/cad/brlcad/pkg-plist
Comment 27 bye 2018-03-01 22:57:44 UTC
FreeBSD blubee 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r326056: Tue Nov 21 14:54:55 UTC 2017     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

revision 463356.

The port has been failing to build for at least 1 month now, is this a known issue?

-- Looking for vfork - found
-- Looking for vsscanf
-- Looking for vsscanf - found
-- Looking for writev
-- Looking for writev - found
-- Performing Test HAVE_DECL_KILL
-- Performing Test HAVE_DECL_KILL - Success
-- Performing Test HAVE_DECL_FILENO
-- Performing Test HAVE_DECL_FILENO - Success
CMake Warning (dev) in src/other/openNURBS/CMakeLists.txt:
  Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
  interface.  Run "cmake --help-policy CMP0022" for policy details.  Use the
  cmake_policy command to set the policy and suppress this warning.

  Target "openNURBS" has an INTERFACE_LINK_LIBRARIES property which differs
  from its LINK_INTERFACE_LIBRARIES properties.

  INTERFACE_LINK_LIBRARIES:

    /usr/lib/libz.so

  LINK_INTERFACE_LIBRARIES:

    

This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at CMakeLists.txt:480 (_message):
  Attempting to ignore non-existent file GLOBAL, in directory
  /usr/ports/cad/brlcad/work/brlcad-7.24.0/misc
Call Stack (most recent call first):
  misc/CMake/BRLCAD_CMakeFiles.cmake:137 (message)
  CMakeLists.txt:409 (CMAKEFILES)
  /usr/local/share/cmake/Modules/FindDoxygen.cmake:401 (add_executable)
  /usr/local/share/cmake/Modules/FindDoxygen.cmake:551 (_Doxygen_find_doxygen)
  misc/CMakeLists.txt:48 (find_package)


-- Configuring incomplete, errors occurred!
See also "/usr/ports/cad/brlcad/work/.build/CMakeFiles/CMakeOutput.log".
See also "/usr/ports/cad/brlcad/work/.build/CMakeFiles/CMakeError.log".
*** Error code 1

Stop.
Comment 28 Pedro F. Giffuni freebsd_committer 2018-03-02 01:46:55 UTC
(In reply to bcomputerguy from comment #27)

I had no idea, perhaps it is related to the recent clang updates?

The port needs an update but I just don't have time to check lately.
Comment 29 Walter Schwarzenfeld freebsd_triage 2018-03-02 03:03:54 UTC
It configures if I add to the Makefile
CMAKE_ARGS=     -DCMAKE_DISABLE_FIND_PACKAGE_Doxygen:BOOL=TRUE \
CMAKE_FLAGS+=   -G "Unix Makefiles" -Wno-dev

change tk:85 to tk:86

and the REINPLACE_CMD to
@${REINPLACE_CMD} "s+-exact Tcl 8\.5\.9+Tcl 8.6+" ${WRKSRC}/src/other/tcl/library/init.tcl

=============

but got still:
In file included from /usr/ports/cad/brlcad/work/brlcad-7.24.0/src/libtclcad/tclcad.c:32:
/usr/local/include/tk8.6/tk.h:21:3: error: Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better
#       error Tk 8.6 must be compiled with tcl.h from Tcl 8.6 or better

        ^

=========================
(cat /usr/ports/cad/brlcad/work/brlcad-7.24.0/src/other/tcl/library/init.tcl:

if {[info commands package] == ""} {
    error "version mismatch: library\nscripts expect Tcl version 7.5b1 or later but the loaded version is\nonly [info patchlevel]"
}
package require Tcl 8.6.8
Comment 30 Walter Schwarzenfeld freebsd_triage 2018-03-02 03:05:35 UTC
uups 
changed reinplace to
@${REINPLACE_CMD} "s|-exact Tcl 8.5.9|Tcl 8.6.8|" ${WRKSRC}/src/other/tcl/library/init.tcl
Comment 31 Walter Schwarzenfeld freebsd_triage 2018-03-02 03:10:35 UTC
CMAKE_FLAGS+=   -G "Unix Makefiles" -Wno-dev

cause of CMP 00022 warning

(should better fixed in patch-cmake_3.1.x).
Comment 32 Walter Schwarzenfeld freebsd_triage 2018-03-02 17:40:37 UTC
Created attachment 191141 [details]
svn-diff-brlcad_2018_03_02

Try this. Maybe, it is only (or at least) a workaround.
But it builds and installs with clang40 or clang50 (not with clang60).
The applications seems to start, but it was no time to really check functionallity.

(there are still a lot of warnings in. Mostly boost macros and Wformat warnings).
Comment 33 bye 2018-03-03 14:38:51 UTC
(In reply to w.schwarzenfeld from comment #32)

Is there any reason not to update to 7.26.4?

I tried changing the version in the makefile and then bumping the port revision and then running makesum, the fetch phase fails.

/usr/ports/cad/brlcad % sudo make makesum
=> brlcad-7.26.4.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://downloads.sourceforge.net/project/brlcad/BRL-CAD%20Source/7.26.4/brlcad-7.26.4.tar.bz2
brlcad-7.26.4.tar.bz2                         100% of  652  B 3663 kBps 00m00s

if I manually go to that link and download the source files it works.

I was able to build with bundled libs and run both the benchmarks and regression testings.

The benchmarks passed; some regression tests fails with segmentation fault but I can't get mged to run w/o faulting as well, although I didn't install the build. I just ran it from the cmake build folder.

Is there a problem with FreeBSD fetch phase why it can't pull down the files after updating the Makefile?

Is it possible to try to upstream our patches?
Comment 34 bye 2018-03-03 15:12:25 UTC
Created attachment 191169 [details]
cmake benchmark and regression test

I downloaded the source from github for version 7.26.4 and compiled it and ran some of the built in tests.

I ran cmake with brlcad_bundled_libs=on and release.

Everything built fine, I had to manually install 
x11-toolkits/itk3.3 
and
lang/itcl

The regression tests fail with mged but those seem to be related to not building with GUI.

I think that we can update to the latest version 7.26.4 and try to upstream the patches.

I'd like to try to get the port to build and take over maintainership if that's okay.
Comment 35 Pedro F. Giffuni freebsd_committer 2018-03-03 15:24:59 UTC
(In reply to bcomputerguy from comment #34)

Please do take over, and engage with upstream: the community is very FreeBSD friendly! I know at least two of their main developers and most of their infrastructure use FreeBSD.

Erik used to work with the main BRLCad developers but I understand he is now independent and has less time for this.

I think they mentioned BRLCad requires its own fork of Tcl/Tk. Last time I did an update (in the obsolete patches for this PR) I had problems with conflicting versions of libuuid and something that we had in pkg, hopefully that is fixed now.
Comment 36 bye 2018-03-03 16:08:19 UTC
(In reply to Pedro F. Giffuni from comment #35)

Thanks I'll work on it.

I have a request if you can give this a shot to see if the error is on my end or a problem with SF.

I went into the makefile and bumped the version up from 7.24.0 to 7.26.4 and updated the portrevision, then I remove the brlcad from the distfiles folder.

Then I ran make makesum but it's continually failing to download, just grabbing about 600 bytes.
Comment 37 Pedro F. Giffuni freebsd_committer 2018-03-03 17:34:24 UTC
(In reply to bcomputerguy from comment #36)
...
The first SF repository I hit has a broken file. Just using the file downloaded from bugzilla to get the checksum and the broken distfiles will be skipped:

===>   brlcad-7.26.4 depends on file: /usr/local/sbin/pkg - found
=> brlcad-7.26.4.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://downloads.sourceforge.net/project/brlcad/BRL-CAD%20Source/7.26.4/brlcad-7.26.4.tar.bz2
brlcad-7.26.4.tar.bz2                         100% of  652  B 6069 kBps 00m00s
=> Fetched file size mismatch (expected 0, actual 652)
=> Trying next site
=> Attempting to fetch https://cytranet.dl.sourceforge.net/project/brlcad/BRL-CAD%20Source/7.26.4/brlcad-7.26.4.tar.bz2
brlcad-7.26.4.tar.bz2                           7% of  110 MB  204 kBps 08m31s^C
...

I think we can get rid of some of the patches for older CMake as well.
Comment 38 bye 2018-03-04 04:41:51 UTC
Created attachment 191190 [details]
7.26.4 brlcad update

I took a look at the brlcad and updated to 7.26.4 things work okay I ran into a few issues.

The main one is if I do not install brlcad in it's own folders it has issues with the installed tk/tcl scripts and finding those. I can probably fix that if I spend more time on it ub putting brlcad in it's own folder is a lot simplier.

These portlint warnings below are another issue, should I move the man pages from the brlcad folder or just ignore these errors?

FATAL: /usr/ports/cad/brlcad/pkg-plist: [3579]: Man pages must be installed into ``man'' not ``share/man''.
FATAL: /usr/ports/cad/brlcad/pkg-plist: [3580]: Man pages must be installed into ``man'' not ``share/man''.

There's a diff attached that you can try out and provide some feedback.
Comment 39 Walter Schwarzenfeld freebsd_triage 2018-03-04 07:19:25 UTC
something "little":
You need not to bump portrevision if there is a new portversion.
Comment 40 Walter Schwarzenfeld freebsd_triage 2018-03-04 07:20:03 UTC
Remove portrevision.
Comment 41 Rene Ladan freebsd_committer 2018-06-07 20:19:03 UTC
I'll test the latest patch at https://bugs.freebsd.org/bugzilla/attachment.cgi?id=191190&action=diff and see if it works. Do we still need the previous patch at https://bugs.freebsd.org/bugzilla/attachment.cgi?id=191141&action=diff ?
Comment 42 Rene Ladan freebsd_committer 2018-06-07 20:30:18 UTC
(In reply to bcomputerguy from comment #38)

Ideally manual pages are installed in PREFIX/man/manX/ (where PREFIX is usually /usr/local). I can take a look into that.
Comment 43 bye 2018-06-16 08:03:14 UTC
(In reply to Rene Ladan from comment #42)

I haven't had a chance to look at BRLCAD in a while but I do have it built on my system.

BRLCAD builds and installs in {INSTALL_DIR}/brlcad/

When I try to build it and install it outside of the brlcad directory it breaks the build.

I had some issues with the path and running to build applications; It was recommended to create symlinks so the default install directory will stay the same {INSTALL_DIR}/brlcad and then create symlinks to the {INSTALL_DIR}

That should resolve most of the issues with building brlcad and having a stable port.

I'll try to get things done in the next two week.
Comment 44 bye 2018-07-09 06:25:30 UTC
Created attachment 194976 [details]
brlcad fix

This fix creates symlinks for docs and bin directory to properly add it to a users path.

This means that no longer have to have the pkg-message and everything just works.

I ran a poudriere testport and everything works on amd64 CURRENT.
Comment 45 Rene Ladan freebsd_committer 2018-07-09 17:51:02 UTC
There are still 1400+ warnings and 1400+ errors with `portlint -AC` :
- manual pages must be gzipped
- "If and only if your port is DOCSDIR-safe (that is, a user can override DOCSDIR when building this port and the port will still work correctly) consider using DOCSDIR macro; if you are unsure if this port is DOCSDIR-safe, then ignore this warning" (1400+ of these)
- "Man pages must be installed into ``man'' not ``share/man''."

Regarding the Makefile:
- no need for PORTREVISION if you increase the PORTVERSION
- ${MKDIR} evaluates to `/bin/mkdir -p` , so no need to add the -p parameter yourself

Also, it looks like all patch-* files in the "files" directory are obsolete, can you remove them with `svn rm` so that the svn diff picks this up?
Comment 46 bye 2018-07-10 12:34:40 UTC
(In reply to Rene Ladan from comment #45)

Yes, I'll continue to fix these issues but please give me a little time.

In it's current state it's at least not broken; I won't abandon the port but I am working on others as well.
Comment 47 Rene Ladan freebsd_committer 2018-08-10 15:40:45 UTC
The update started to fail in new ways on recent 10.4 / 11.1, can you investigate?
Comment 48 bye 2018-08-12 05:23:08 UTC
(In reply to Rene Ladan from comment #47)

Yes, I've noticed that as well. I am working on it and i'll submit something that passes portlint w/o all the man pages errors.
Comment 49 bye 2018-08-24 15:43:27 UTC
(In reply to Rene Ladan from comment #47)

I took a look into this issue and it's failing because of an unknown linker flag being passed to ld; /usr/bin/ld

Here's an issue that was closed upstream in the LLVM repo: 
https://reviews.llvm.org/D42687


If you apply those patches you should be able to build no problems.

I am trying to figure out how to solve this w/o asking users to patch any files. Currently I am not sure, I'll think about it more in the morning.
Comment 50 bye 2018-08-28 14:00:02 UTC
Created attachment 196645 [details]
Fix of LLVM bug introduced somewhere

Seems like Revision r337852 or somewhere around there introduced some LLVM bug, one is the issue that you faced but even after fixing that there's another bug later where the linker cannot find main in cr1 so make sure that you're on revision r337928 or later and please report back.

The initial bug already has an upstream fix: https://reviews.llvm.org/D42733
Comment 51 bye 2018-09-25 05:09:24 UTC
Created attachment 197475 [details]
portlint ACM passes

This should build no problems with portlint.
Comment 52 Rene Ladan freebsd_committer 2018-09-28 18:29:50 UTC
When building on 12.0-ALPHA8 on amd64 I get:

[3447/4251] /usr/local/libexec/ccache/c++   -Iinclude -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/include -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/include -Isrc/other/stepcode/include -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cleditor -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cldai -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/clstepcore -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/clutils -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base/judy/src -isystem /usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -w -fPIE   -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -DNO_REGISTRY -MD -MT src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o -MF src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o.d -o src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o -c /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazy_test.cc
FAILED: src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o 
/usr/local/libexec/ccache/c++   -Iinclude -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/include -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/include -Isrc/other/stepcode/include -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cleditor -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cldai -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/clstepcore -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/clutils -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base -I/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base/judy/src -isystem /usr/local/include -O2 -pipe -fstack-protector -fno-strict-aliasing -w -fPIE   -pedantic -W -Wall -Wundef -Wfloat-equal -Wshadow -Winline -Wno-long-long -DNO_REGISTRY -MD -MT src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o -MF src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o.d -o src/other/stepcode/src/cllazyfile/CMakeFiles/lazy_test.dir/lazy_test.cc.o -c /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazy_test.cc
In file included from /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazy_test.cc:1:
In file included from /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazyInstMgr.h:8:
In file included from /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazyDataSectionReader.h:6:
In file included from /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/sectionReader.h:6:
In file included from /usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazyTypes.h:10:
/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base/judy/src/judyL2Array.h:169:28: error: assigning to 'const std::__1::vector<unsigned long, std::__1::allocator<unsigned long> > *' from incompatible type 'unsigned long'
                kv.value = ( JudyValue ) 0;
                           ^~~~~~~~~~~~~~~
/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/base/judy/src/judyL2Array.h:180:20: note: in instantiation of member function 'judyL2Array<unsigned long, unsigned long>::mostRecentPair' requested here
            return mostRecentPair();
                   ^
/usr/ports/cad/brlcad/work/brlcad-7.26.4/src/other/stepcode/src/cllazyfile/lazy_test.cc:48:37: note: in instantiation of member function 'judyL2Array<unsigned long, unsigned long>::begin' requested here
    instanceRefs_t::cpair p = refs->begin();
                                    ^
1 error generated.
Comment 53 bye 2018-09-29 02:36:58 UTC
(In reply to Rene Ladan from comment #52)

That's strange, I submitted my shar w/o the patch files. That issue is already fixed in the code and upstream as well.


can you create these patch files
cad/brlcad/files/patch-src_other_stepcode_src_base_judy_src_judyS2Array.h

--- src/other/stepcode/src/base/judy/src/judyS2Array.h.orig	2018-09-23 17:58:10 UTC
+++ src/other/stepcode/src/base/judy/src/judyS2Array.h
@@ -191,7 +191,7 @@ class judyS2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = 0;
                 _success = false;
             }
             kv.key = _buff;


cad/brlcad/files/patch-src_other_stepcode_src_base_judy_src_judyL2Array.h

--- src/other/stepcode/src/base/judy/src/judyL2Array.h.orig	2018-09-23 17:31:19 UTC
+++ src/other/stepcode/src/base/judy/src/judyL2Array.h
@@ -166,7 +166,7 @@ class judyL2Array {
                 kv.value = *_lastSlot;
                 _success = true;
             } else {
-                kv.value = ( JudyValue ) 0;
+                kv.value = 0;
                 _success = false;
             }
             kv.key = _buff[0];
Comment 54 bye 2018-09-29 05:15:18 UTC
Created attachment 197589 [details]
brlcad fix as .shar file

I am not sure why svn diff -r HEAD isn't picking up my patches.

Here's a .shar file with the patches, I just tested this again and there should be no further issues.
Comment 55 Rene Ladan freebsd_committer 2018-09-29 11:06:33 UTC
(In reply to bcomputerguy from comment #54)

Did you explicitly 'svn add' the new patches (and 'svn rm' obsolete ones)? Otherwise subversion does not pick these changes up, it would see them as extraneous respectively missing files.

With the 20180925 patch, the build gets into a loop on i386 systems (both on 10.4-i386 and 12.0ALPHA8):

CMake Error at misc/CMake/BRLCAD_Summary.cmake:188 (list):
  list REMOVE_AT given empty list
Call Stack (most recent call first):
  misc/CMake/BRLCAD_Summary.cmake:222 (print_flags)
  CMakeLists.txt:3136 (BRLCAD_Summary)


CMake Error at misc/CMake/BRLCAD_Summary.cmake:175 (list):
  list GET given empty list
Call Stack (most recent call first):
  misc/CMake/BRLCAD_Summary.cmake:222 (print_flags)
  CMakeLists.txt:3136 (BRLCAD_Summary)


CMake Error at misc/CMake/BRLCAD_Summary.cmake:188 (list):
  list REMOVE_AT given empty list
Call Stack (most recent call first):
  misc/CMake/BRLCAD_Summary.cmake:222 (print_flags)
  CMakeLists.txt:3136 (BRLCAD_Summary)


CMake Error at misc/CMake/BRLCAD_Summary.cmake:175 (list):
  list GET given empty list
Call Stack (most recent call first):
  misc/CMake/BRLCAD_Summary.cmake:222 (print_flags)
  CMakeLists.txt:3136 (BRLCAD_Summary)


(repeat infinitely..)

This is with the latest cmake in ports, version 3.12.2
Comment 56 Rene Ladan freebsd_committer 2018-09-29 14:58:28 UTC
On 12-ALPHA8 amd64 using the latest shar the port fails to link, see https://people.freebsd.org/~rene/stuff/brlcad-12amd64-default.log
Comment 57 bye 2018-09-29 19:34:26 UTC
(In reply to Rene Ladan from comment #56)

lib/libbn.so.20.0.1 lib/libbu.so.20.0.1 lib/libregex.so.1.0.4 -pthread -ldl /usr/local/lib/libuuid.so -lm && :
/usr/bin/ld: error: undefined symbol: main
>>> referenced by crt1.c:74 (/usr/src-vanilla/lib/csu/amd64/crt1.c:74)
>>>               /usr/lib/crt1.o:(_start)

This is an issue that I've brought up on the mailing list. This is a bit out of my control right now as LLVM is releasing/ released; FreeBSD is doing what it needs to to bring LLVM in line with what FreeBSD expects.

The debugging steps require me to test to try to find the exact revision that causes this issue to show up but with the same port; I have had it build successfully then that error shows up.

Please try on a different revision if possible. I have had confirmation from at least 1 other person that it works on 11.x and it's working on:
FreeBSD 12.0-ALPHA5 FreeBSD 12.0-ALPHA5 #0 r338520: Fri Sep  7 23:31:46 CST 2018     root@:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

that issue with missing symbol main is a toolchain issue.
Comment 58 Rene Ladan freebsd_committer 2018-09-30 20:53:27 UTC
Ah, my mistake. The log I uploaded was built on an APLHA8 kernel but built in an ALPHA3 jail. I spotted no compiler changes between r338317 (my ALPHA3 jail) and r338520 (your working version) however, but there were some compiler changes between r338520 and ALPHA8.

I'll update the jail and try again.
Comment 59 Rene Ladan freebsd_committer 2018-10-01 17:09:52 UTC
Nope, it fails with a 12.0-APLHA8 jail too. So the port needs some older compiler, which can be configured with USES=compiler:* and/or USE_GCC
Comment 60 Rene Ladan freebsd_committer 2019-02-24 15:21:50 UTC
Any update on this?
Comment 61 Walter Schwarzenfeld freebsd_triage 2019-04-07 10:15:56 UTC
In the meantime port has an expiration date. =>  	 EXPIRATION_DATE= 2019-05-08.
Comment 62 Rene Ladan freebsd_committer 2019-05-13 19:05:40 UTC
Expired port removed, no feedback for 3+ months.
Comment 63 Pedro F. Giffuni freebsd_committer 2019-05-13 19:16:02 UTC
(In reply to Rene Ladan from comment #62)

I thought the update was going to be committed?

I didn't grab the port and commit the update because you were holding it.
Comment 64 Pedro F. Giffuni freebsd_committer 2019-05-13 19:18:25 UTC
(In reply to Pedro F. Giffuni from comment #63)

And this PR was for a previous update and it has become quite messy.

In any case ... guys please open a fresh PR with the new port.
Comment 65 Rene Ladan freebsd_committer 2019-05-26 21:34:32 UTC
At the time the patch was not working, so there was nothing proper to commit. Sorry for the confusion :(