Bug #817
GMT-4.5.14 fails to compile on Solaris
| Status: | Closed | Start date: | 2015-11-18 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 100% | ||
| Category: | - | Estimated time: | 1.00 hour | |
| Target version: | Candidate for next bugfix release | |||
| Affected version: | 4.5.x | Platform: | other |
Description
Related to forum message by Wolfgang
System = SunOS
Release = 5.10
KernelID = Generic_150401-29
Machine = i86pc
gcc -O2 -Wall -m64 -fPIC -fno-strict-aliasing -std=c99 -I/opt/csw/include -I/opt/csw/include -DGMT_SHARE_PATH=\"/opt/GMT-4.5.14/share\" -DGMT_GSHHG_PATH=\"/opt/GMT-4.5.14/src/gshhg-gmt-2.3.4\" -DTRIANGLE_D -DUSE_GDAL -c gmt_io.c
In file included from /usr/include/iso/ctype_iso.h:30:0,
from /usr/include/ctype.h:18,
from gmt.h:63,
from gmt_io.c:84:
/opt/csw/lib/gcc/i386-pc-solaris2.10/4.9.2/include-fixed/sys/feature_tests.h:346:2: Fehler: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications and pre-2001 POSIX applications"
#error "Compiler or options invalid for pre-UNIX 03 X/Open applications \
^
Error code 1
make: Fatal error: Command failed for target `gmt_io.o'
Current working directory /opt/GMT-4.5.14/src/gmt-4.5.14/src
Error code 1
make: Fatal error: Command failed for target `gmt'
History
#1
Updated by Remko over 1 year ago
The solution appears to be here [[http://stackoverflow.com/questions/6774738/compiling-ncurses-on-solaris-compiler-or-options-invalid-for-pre-unix-03-x-op]]
#2
Updated by Remko over 1 year ago
- Status changed from New to Resolved
- % Done changed from 0 to 100
- Estimated time set to 1.00
- Platform set to other
This appears a known problem with Solaris.
The solution was
- Replace
#define _XOPEN_SOURCE
by#ifdef __FreeBSD__ #define _XOPEN_SOURCE #else #define _XOPEN_SOURCE 600 #endif
- Remove
#define _POSIX_SOURCE 1