-
Notifications
You must be signed in to change notification settings - Fork 43
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
Issues with RSET on mbcontour.c and mbgrdtiff.c #39
Comments
Luis,
What version of GMT is installed? The current MB-System ought to build ok with GMT 5.4.0 and later, and should be forward compatible with the upcoming GMT 6.
Cheers,
Dave
… On Feb 15, 2019, at 3:49 AM, Luís Carvalheiro ***@***.***> wrote:
Had some troubles while building latest release on debian stable.
while doing a make, got:
In file included from /usr/include/gmt/gmt_dev.h:136:0, from mbcontour.c:43: mbcontour.c: In function ‘GMT_mbcontour_parse’: mbcontour.c:538:63: error: ‘RSET’ undeclared (first use in this function) n_errors += gmt_M_check_condition(GMT, !GMT->common.R.active[RSET], "Syntax error: Must specify -R option\n");
commented the usage of RSET in mbcontour.c , cleaned the build, restarted the make and got a
mbgrdtiff.c: In function ‘GMT_mbgrdtiff’: mbgrdtiff.c:852:28: error: ‘RSET’ undeclared (first use in this function) if (!GMT->common.R.active[RSET] && n_grids) ^~~~
Followed the same strategy, and commented the block with the if condition.
Built correctly after that...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
----------------------------------------------------
David W. Caress
Principal Engineer
Seafloor Mapping Lab
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039
caress@mbari.org
http://www.mbari.org/~caress/
Phone: 831-775-1775
|
Luis,
It looks like Debian stable uses GMT 5.3
You identified two places where the preprocessor statements allowing backward compatibility to GMT 5.3 were missing. Those have been added, and these changes have been pushed to the master branch of the repo. The fixes allowing building with GMT 5.3 will be part of the next release.
Thanks,
Dave
… On Feb 25, 2019, at 1:18 PM, caress ***@***.***> wrote:
Luis,
What version of GMT is installed? The current MB-System ought to build ok with GMT 5.4.0 and later, and should be forward compatible with the upcoming GMT 6.
Cheers,
Dave
> On Feb 15, 2019, at 3:49 AM, Luís Carvalheiro ***@***.***> wrote:
>
> Had some troubles while building latest release on debian stable.
> while doing a make, got:
>
> In file included from /usr/include/gmt/gmt_dev.h:136:0, from mbcontour.c:43: mbcontour.c: In function ‘GMT_mbcontour_parse’: mbcontour.c:538:63: error: ‘RSET’ undeclared (first use in this function) n_errors += gmt_M_check_condition(GMT, !GMT->common.R.active[RSET], "Syntax error: Must specify -R option\n");
>
> commented the usage of RSET in mbcontour.c , cleaned the build, restarted the make and got a
>
> mbgrdtiff.c: In function ‘GMT_mbgrdtiff’: mbgrdtiff.c:852:28: error: ‘RSET’ undeclared (first use in this function) if (!GMT->common.R.active[RSET] && n_grids) ^~~~
>
> Followed the same strategy, and commented the block with the if condition.
> Built correctly after that...
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub, or mute the thread.
>
----------------------------------------------------
David W. Caress
Principal Engineer
Seafloor Mapping Lab
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039
***@***.***
http://www.mbari.org/~caress/
Phone: 831-775-1775
----------------------------------------------------
David W. Caress
Principal Engineer
Seafloor Mapping Lab
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039
caress@mbari.org
http://www.mbari.org/~caress/
Phone: 831-775-1775
|
Dave
Thanks! |
Dave and Luis, It could be that the netcdf package. The GMT package from backports is accepting anything between libnetcdf 3.6 (from 2008) and 4.4 (2016). Likely the netcdf library package in Luis’ installation is netcdf 4.4. But the regular libnetcdf from Debian (stable) is 4.3 from 2014. Maybe that could be reason, maybe not. Cheers, |
Christian, |
Luis,
I don’t see how you can get the reported error if the code is loading the gmt_common.h from 5.4.5, as the R structure is defined as
struct R { /* -Rw/e/s/n[/z_min/z_max][r] or -Rgridfile */
bool active[4]; /* RSET = 0: -R, ISET = 1: inc, GSET = 2: -r, FSET = 3: read grid */
bool oblique; /* true when -R...r was given (oblique map, probably), else false (map borders are meridians/parallels) */
uint32_t registration; /* Registration mode of a grid given via -r or -Rgrid */
double wesn[6]; /* Boundaries of west, east, south, north, low-z and hi-z */
double wesn_orig[4]; /* Original Boundaries of west, east, south, north (oblique projection may reset wesn above) */
double inc[2]; /* For grid increments set via -Idx/dy or implicitly via -Ggrid */
char string[GMT_LEN256];
} R;
For GMT 5.3 and prior the R.active parameter is a bool rather than an array of bool, consistent with your error.
My guess is that the C preprocessor was loading header files from Debian’s default installation of GMT 5.3. You might have your execution environment set via the PATH variable to execute gmt 5.4.5 and still have your build environment looking to the default installation. Although my mods to the master branch should allow building with GMT 5.3 again, I expect that linking with GMT 5.3 and then running with GMT 5.4 will cause issues.
Cheers,
Dave
… On Feb 26, 2019, at 3:19 AM, Luís Carvalheiro ***@***.***> wrote:
Dave
On my workstation I'm using backports, so
gmt --version
5.4.5
Thanks!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
On Feb 15, 2019, at 3:49 AM, Luís Carvalheiro ***@***.***> wrote:
Had some troubles while building latest release on debian stable.
while doing a make, got:
In file included from /usr/include/gmt/gmt_dev.h:136:0, from mbcontour.c:43: mbcontour.c: In function ‘GMT_mbcontour_parse’: mbcontour.c:538:63: error: ‘RSET’ undeclared (first use in this function) n_errors += gmt_M_check_condition(GMT, !GMT->common.R.active[RSET], "Syntax error: Must specify -R option\n");
commented the usage of RSET in mbcontour.c , cleaned the build, restarted the make and got a
mbgrdtiff.c: In function ‘GMT_mbgrdtiff’: mbgrdtiff.c:852:28: error: ‘RSET’ undeclared (first use in this function) if (!GMT->common.R.active[RSET] && n_grids) ^~~~
Followed the same strategy, and commented the block with the if condition.
Built correctly after that...
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
----------------------------------------------------
David W. Caress
Principal Engineer
Seafloor Mapping Lab
Monterey Bay Aquarium Research Institute
7700 Sandholdt Road
Moss Landing, CA 95039
caress@mbari.org
http://www.mbari.org/~caress/
Phone: 831-775-1775
|
Had some troubles while building latest release on debian stable.
while doing a
make
, got:In file included from /usr/include/gmt/gmt_dev.h:136:0, from mbcontour.c:43: mbcontour.c: In function ‘GMT_mbcontour_parse’: mbcontour.c:538:63: error: ‘RSET’ undeclared (first use in this function) n_errors += gmt_M_check_condition(GMT, !GMT->common.R.active[RSET], "Syntax error: Must specify -R option\n");
commented the usage of RSET in mbcontour.c , cleaned the build, restarted the make and got a
mbgrdtiff.c: In function ‘GMT_mbgrdtiff’: mbgrdtiff.c:852:28: error: ‘RSET’ undeclared (first use in this function) if (!GMT->common.R.active[RSET] && n_grids) ^~~~
Followed the same strategy, and commented the block with the if condition.
Built correctly after that...
The text was updated successfully, but these errors were encountered: