Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v.in.pdal does not compile on Mac #475

Closed
cmbarton opened this issue Apr 1, 2020 · 9 comments · Fixed by #479
Closed

v.in.pdal does not compile on Mac #475

cmbarton opened this issue Apr 1, 2020 · 9 comments · Fixed by #479

Comments

@cmbarton
Copy link
Contributor

cmbarton commented Apr 1, 2020

v.in.pdal has never compiled on the Mac for some reason. While I've asked about this briefly in the list, I have not put in a formal bug report because of many other compiling issues. Now that they are being solved, it is time to report on v.in.pdal.

The error reported is below

x86_64-apple-darwin13.4.0-clang -D_FORTIFY_SOURCE=2 -mmacosx-version-min=10.9 -I/Applications/GRASS-7.9.app/Contents/Resources/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.14.sdk -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Users/cmbarton/grass_source/master/grass/dist.x86_64-apple-darwin18.7.0/include -I/Users/cmbarton/grass_source/master/grass/dist.x86_64-apple-darwin18.7.0/include -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Applications/GRASS-7.9.app/Contents/Resources/include -march=core2 -mtune=haswell -mssse3 -ftree-vectorize -fPIC -fPIE -fstack-protector-strong -O2 -pipe -stdlib=libc++ -fvisibility-inlines-hidden -std=c++14 -fmessage-length=0 -isystem /Applications/GRASS-7.9.app/Contents/Resources/include -fdebug-prefix-map=/usr/local/miniconda/conda-bld/pdal_1585081244914/work=/usr/local/src/conda/pdal-2.1.0 -fdebug-prefix-map=/Applications/GRASS-7.9.app/Contents/Resources=/usr/local/src/conda-prefix -std=c++11 -std=c++11 -DPACKAGE=\""grassmods"\" -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Applications/GRASS-7.9.app/Contents/Resources/include/libxml2 -I/Applications/GRASS-7.9.app/Contents/Resources/include -I/Users/cmbarton/grass_source/master/grass/dist.x86_64-apple-darwin18.7.0/include -I/Users/cmbarton/grass_source/master/grass/dist.x86_64-apple-darwin18.7.0/include -DRELDIR=\"vector/v.in.pdal\" -o OBJ.x86_64-apple-darwin18.7.0/filters.o -c filters.c

  • Operating System: Mac OSX 10.14 (but also on earlier and later versions)
  • GRASS GIS version 7.8.3dev

date=1 April 2020
revision=e6456c1f0
build_date=2020-04-01
build_platform=x86_64-apple-darwin18.7.0
build_off_t_size=8
libgis_revision=
libgis_date=
proj=6.2.0
gdal=3.0.1
geos=3.7.2dev
sqlite=3.31.1

@petrasovaa
Copy link
Contributor

There is no actual error here. Configure parameters would be helpful too.

@nilason
Copy link
Contributor

nilason commented Apr 2, 2020

gcc  -g   -I/Volumes/dev/grass/dist.x86_64-apple-darwin18.7.0/include -I/Volumes/dev/grass/dist.x86_64-apple-darwin18.7.0/include   -I/opt/local/include -I/opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11 -DPACKAGE=\""grassmods"\"  -I/opt/local/include/postgresql10 -I/opt/local/lib/PROJ6/include -I/opt/local/include -I/opt/local/include -I/opt/local/include/libxml2 -I/opt/local/include -I/Volumes/dev/grass/dist.x86_64-apple-darwin18.7.0/include -I/Volumes/dev/grass/dist.x86_64-apple-darwin18.7.0/include -DRELDIR=\"vector/v.in.pdal\" -o OBJ.x86_64-apple-darwin18.7.0/filters.o -c filters.c
error: invalid argument '-std=c++11' not allowed with 'C'
make[1]: *** [OBJ.x86_64-apple-darwin18.7.0/filters.o] Error 1
CFLAGS=-g CXXFLAGS=-g ./configure --with-freetype --with-freetype-includes=/opt/local/include/freetype2 --with-freetype-libs=/opt/local/lib --with-gdal=/opt/local/bin/gdal-config --with-pdal=/opt/local/bin/pdal-config --with-geos=/opt/local/bin/geos-config --with-proj --with-proj-includes=/opt/local/lib/PROJ6/include --with-proj-libs=/opt/local/lib/PROJ6/lib --with-proj-share=/opt/local/lib/PROJ6/share/proj --with-png-includes=/opt/local/include --with-png-libs=/opt/local/lib --with-tiff-includes=/opt/local/include --with-tiff-libs=/opt/local/lib --with-postgres=yes --with-postgres-includes=/opt/local/include/postgresql10 --with-postgres-libs=/opt/local/lib/postgresql10 --with-liblas-includes=/opt/local/include/liblas--with-liblas-libs=/opt/local/lib --without-mysql --with-pthread --with-cairo --with-cairo-includes=/opt/local/include/cairo --with-cairo-libs=/opt/local/lib --with-blas=no --with-lapack=no --with-bzlib --with-bzlib-includes=/opt/local/include --with-bzlib-libs=/opt/local/lib --with-zstd --with-zstd-includes=/opt/local/include --with-zstd-libs=/opt/local/lib --with-sqlite --with-sqlite-libs=/opt/local/lib --with-sqlite-includes=/opt/local/include --with-fftw-includes=/opt/local/include --with-fftw-libs=/opt/local/lib --with-readline --with-readline-includes=/opt/local/include/readline --with-readline-libs=/opt/local/lib --with-opengl=aqua

@nilason
Copy link
Contributor

nilason commented Apr 2, 2020

$ /opt/local/bin/pdal-config --cflags
-pipe -Os -DNDEBUG -I/opt/local/include
$ /opt/local/bin/pdal-config --cxxflags
-pipe -Os -DNDEBUG -I/opt/local/include -stdlib=libc++ -std=c++11

@nilason
Copy link
Contributor

nilason commented Apr 2, 2020

The problem is caused by

EXTRA_CFLAGS = $(VECT_CFLAGS) $(PDALCPPFLAGS)

which is used for c files as well as c++ files.

Compiling this module in two passes (with and without $(PDALCPPFLAGS) made a successfull compilation.

nilason added a commit to nilason/grass that referenced this issue Apr 2, 2020
@cmbarton
Copy link
Contributor Author

cmbarton commented Apr 2, 2020

I just tried to compile master and v.in.pdal still doesn't compile. I want to make sure I have the right version:

GRASS GIS 7.9.dev a6cf558

@nilason
Copy link
Contributor

nilason commented Apr 2, 2020

It's not merged yet, must be reviewed and tested for other platforms first. Although it is possible to do a git pull of my PR, I would say the easiest solution now would be to manually alter the v.in.pdal/Makefilefile to: https://github.com/OSGeo/grass/blob/209cfb2fdf21e4cc27bdf828893ce2ec3a3954e4/vector/v.in.pdal/Makefile.

@neteler
Copy link
Member

neteler commented Apr 2, 2020

The easiest way to get the changes of PR479 locally applied is this:

# simply add .diff to the PR number:
wget https://github.com/OSGeo/grass/pull/479.diff
git apply 479.diff
# ... done.

# verify
git status

Then recompile (here, just v.in.pdal).

@nilason
Copy link
Contributor

nilason commented Apr 2, 2020

While there wget isn't installed by default on mac the following:

curl -L https://github.com/OSGeo/grass/pull/479.diff --output 479.diff

should lead to the same result.

@cmbarton
Copy link
Contributor Author

cmbarton commented Apr 2, 2020

Thanks. I can just wait until the merge. Just wanted to make sure I wasn't missing it for some other reason.

@petrasovaa petrasovaa linked a pull request Apr 7, 2020 that will close this issue
petrasovaa pushed a commit that referenced this issue Apr 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants