Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#57211 closed defect (fixed)

liblas failed with Mojave

Reported by: stanimura Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.5.3
Keywords: mojave Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez), mojca (Mojca Miklavec)
Port: liblas

Description

liblas can not be compiled with Mojave.

$ port installed gcc7 cmake
The following ports are currently installed:
  cmake @3.12.2_0 (active)
  gcc7 @7.3.0_3 (active)

Attachments (2)

main.log (119.0 KB) - added by stanimura 6 years ago.
liblas.Portfile (1.9 KB) - added by stanimura 6 years ago.

Download all attachments as: .zip

Change History (18)

Changed 6 years ago by stanimura

Attachment: main.log added

comment:1 Changed 6 years ago by mf2k (Frank Schima)

Keywords: mojave added; Mojave removed
Owner: set to venabled@…
Status: newassigned

comment:2 Changed 6 years ago by bjornpiltz

The description is misleading since gcc7 and cmake have nothing to do with liblas, but he problem exists. You can find this in the log:

info:build In file included from /opt/local/include/ogr_srs_api.h:35:
:info:build In file included from /opt/local/include/ogr_core.h:34:
:info:build /opt/local/include/cpl_port.h:187:6: error: Must have C++11 or newer.

comment:3 Changed 6 years ago by Malauch

I confirm that liblas can't be installed on Mojave. Below last few lines of my logfile.

:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/work/libLAS-1.8.1'
:info:build make[1]: *** [src/CMakeFiles/las.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/work/libLAS-1.8.1'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/work/libLAS-1.8.1'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/work/libLAS-1.8.1" && /usr/bin/make -j8 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build Failed to build liblas: command execution failed
:debug:build Error code: CHILDSTATUS 6355 2
:debug:build Backtrace: command execution failed
:debug:build     while executing
:debug:build "system {*}$notty {*}$nice $fullcmdstring"
:debug:build     invoked from within
:debug:build "command_exec build"
:debug:build     (procedure "portbuild::build_main" line 8)
:debug:build     invoked from within
:debug:build "$procedure $targetname"
:error:build See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/main.log for details.

comment:4 Changed 6 years ago by stanimura

It should be noted that libLAS can be build from libLAS-1.8.1-src.tar.bz2 with following steps in https://liblas.org/compilation.html when compiling outside of Macports. The steps are followed:

$ cd liblas
$ mkdir makefiles
$ cd makefiles
$ cmake -G "Unix Makefiles" ../

I wonder if simply reproducing these steps in Portfile may help.

comment:5 Changed 6 years ago by stanimura

Personally I solved this issue by editing Portfile of liblas as followd:

$ diff -u /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/gis/liblas/Portfile liblas.Profile
--- /opt/local/var/macports/sources/rsync.macports.org/release/tarballs/ports/gis/liblas/Portfile	2018-02-17 00:25:28.000000000 +0900
+++ liblas.Profile	2018-10-11 19:41:03.000000000 +0900
@@ -37,8 +37,12 @@
                     port:gdal \
                     port:libgeotiff

-post-destroot {
-    exec install_name_tool -id ${prefix}/lib/liblas.2.4.0.dylib ${destroot}${prefix}/lib/liblas.2.4.0.dylib
-    exec install_name_tool -id ${prefix}/lib/liblas_c.2.4.0.dylib ${destroot}${prefix}/lib/liblas_c.2.4.0.dylib
-    exec install_name_tool -change "@rpath/liblas.3.dylib" ${prefix}/lib/liblas.3.dylib ${destroot}${prefix}/lib/liblas_c.2.4.0.dylib
-}
+configure.dir           /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_liblas/liblas/work/libLAS-1.8.1/makefiles
+configure.cmd cmake
+configure.args {-G "Unix Makefiles" ../ }
+
+#post-destroot {
+#    exec install_name_tool -id ${prefix}/bin/Release/liblas.2.4.0.dylib ${destroot}${prefix}/lib/liblas.2.4.0.dylib
+#    exec install_name_tool -id ${prefix}/bin/Release/liblas_c.2.4.0.dylib ${destroot}${prefix}/lib/liblas_c.2.4.0.dylib
+#    exec install_name_tool -change "@rpath/liblas.3.dylib" ${prefix}/lib/liblas.3.dylib ${destroot}${prefix}/lib/liblas_c.2.4.0.dylib
+#}

Since configure.dir is hardcoding, it may not work elsewhere.

comment:6 Changed 6 years ago by MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)

Cc: MarcusCalhoun-Lopez added

comment:7 Changed 6 years ago by Malauch

Stanimura, I tried your method but it doesn't work for me. I use all default locations so the hardcoded path shouldn't be a problem.

I got error like that:

--->  Configuring liblas
Error: Failed to configure liblas: can't create directory "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_gis_liblas": permission denied
Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_gis_liblas/liblas/main.log for details.
Error: Follow https://guide.macports.org/#project.tickets to report a bug.
Error: Processing of port liblas failed

Can you paste here whole edited port file?

Changed 6 years ago by stanimura

Attachment: liblas.Portfile added

comment:8 Changed 6 years ago by stanimura

Malauch, here it is. As in liblas.Portfile, the revision dose not increase because of only for personal use.

comment:9 Changed 6 years ago by Veence (Vincent)

Resolution: fixed
Status: assignedclosed

Problem is simply the lack of the -std=c++11 flag during compilation. I've committed a patch to the Portfile. Also the patch file seemed to be wrong, so I've corrected it. It now compiles fine again.

comment:10 Changed 6 years ago by sgrewe (Stefan Grewe)

Still does not compile for me

Version 1, edited 6 years ago by sgrewe (Stefan Grewe) (previous) (next) (diff)

comment:11 Changed 6 years ago by sgrewe (Stefan Grewe)

Resolution: fixed
Status: closedreopened

comment:12 Changed 6 years ago by Veence (Vincent)

This should have been taken care of by the patch. What does

find /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ -name patch-gt_citation_cpp.diff -exec less {} \;

report?

comment:13 Changed 6 years ago by sgrewe (Stefan Grewe)

It is compiling now also for me

comment:14 Changed 6 years ago by kurthindenburg (Kurt Hindenburg)

Owner: venabled@… deleted
Status: reopenedassigned

comment:15 Changed 5 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: assignedclosed

I assume this is fixed then, so I'm closing the ticket. If I'm missing something, please reopen.

comment:16 Changed 5 years ago by mojca (Mojca Miklavec)

Cc: mojca added
Note: See TracTickets for help on using tickets.