GenericMappingTools / 2021-unavco-course

Planning and material for the 2021 UNAVCO GMT for Geodesy course
GNU Lesser General Public License v2.1
28 stars 10 forks source link

Ghostscript/GDAL/ffmpeg Installation Issues Linux #1

Closed krkrueger closed 3 years ago

krkrueger commented 3 years ago

I am having an issue with installing these. I am using RHEL 6.10.

It seems pretty straight forward, I download, get them unzipped, do the ./configure and everything seems to be going well. Then I do make, and I get a handful of errors saying #pragma GCC diagnostic not allowed inside functions. Some of the ./configures don't work, all pointing to an out of date c++ compiler. Is there a way to have an updated version of gcc on a user account without requiring sudo privileges (I do not have these on the computer that I will need to use this on)?

I have a ticket out with IT trying to see if they can give me those privileges for this, but that can take awhile, and it might not go the way I want it to.

ghostpdl error during make: In file included from ./base/srdline.h:23, from ./base/gp.h:41, from ./base/gp_getnv.c:22: ./base/scommon.h: In function ‘stream_cursor_read_init’: ./base/scommon.h:122: error: #pragma GCC diagnostic not allowed inside functions ./base/scommon.h:123: error: #pragma GCC diagnostic not allowed inside functions ./base/scommon.h:129: error: #pragma GCC diagnostic not allowed inside functions ./base/scommon.h: In function ‘stream_cursor_write_init’: ./base/scommon.h:137: error: #pragma GCC diagnostic not allowed inside functions ./base/scommon.h:138: error: #pragma GCC diagnostic not allowed inside functions ./base/scommon.h:144: error: #pragma GCC diagnostic not allowed inside functions make: *** [obj/gp_getnv.o] Error 1

GDAL error during ./configure configure: error: *** A compiler with support for C++11 language features is required.

seisman commented 3 years ago

It's definitely painful to install GMT and its dependencies on an old Linux system, especially that CentOS 6.10 reached the end of life last year.

Why not use Anaconda and install GMT via a single command conda install gmt=6.2.0 -c conda-forge? It doesn't require sudo privileges.

krkrueger commented 3 years ago

Yes, I did this for GMT. But it said for Linux that you needed to also install ghostscript/gdal/ffmpeg. Does conda install do the installations all together like the windows install does?

seisman commented 3 years ago

Yes, all these packages are automatically installed when you run conda install gmt=6.2.0 -c conda-forge.

krkrueger commented 3 years ago

Ok, then I might be in good shape. I will check tomorrow if everything runs.

seisman commented 3 years ago

I'm closing the issue. Feel free to reopen it if you still have the same problem.