Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Nicklas Larsson via grass-dev


> On 24 Jan 2024, at 15:31, Martin Landa  wrote:
> 
> Hi,
> 
> st 24. 1. 2024 v 15:22 odesílatel Nicklas Larsson  > napsal:
>> I too would have been surprised if glibc wasn’t there. (I’m shooting from 
>> the hips :-).
>> 
>> You can investigate the "config.log” for hopefully more detailed information 
>> on why the math library configure test failed.
> 
> oh, it is caused by -Werror.
> 


Yes, of course!

You can add it after configure: e.g. `make CFLAGS=‘$CFLAGS -Werror’` if you 
want, but not before.


Cheers!


> conftest.c:59:1: note: 'atan' is declared in header ''
>58 | #include 
>59 | #undef atan
> cc1: all warnings being treated as errors
> 
> See also:
> 
>54 | int64_t x;
>   | ^
> cc1: all warnings being treated as errors
> 
> Now with
> 
> CFLAGS="-g -Wall -fno-common -Wextra -Wunused" \
>  CXXFLAGS="-g -Wall -I/usr/include"  \
> ./configure --prefix=/opt/grass \
> --enable-largefile --enable-shared \
> --with-blas --with-bzlib --with-cairo --with-cxx --with-freetype \
> --with-freetype-includes=/usr/include/freetype2 --with-gdal \
> --with-geos --with-lapack --with-netcdf --with-nls \
> --with-odbc --with-openmp --with-pdal=no \
> --with-postgres --with-postgres-includes=/usr/include/postgresql \
> --with-proj-share=/usr/share/proj --with-readline \
> --with-sqlite --with-x --with-zstd
> 
> it compiles...
> 
> Martin
> 
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Martin Landa via grass-dev
Hi,

st 24. 1. 2024 v 15:22 odesílatel Nicklas Larsson 
napsal:

> I too would have been surprised if glibc wasn’t there. (I’m shooting from
> the hips :-).
>
> You can investigate the "config.log” for hopefully more detailed
> information on why the math library configure test failed.
>

oh, it is caused by -Werror.

conftest.c:59:1: note: 'atan' is declared in header ''
   58 | #include 
   59 | #undef atan
cc1: all warnings being treated as errors

See also:

   54 | int64_t x;
  | ^
cc1: all warnings being treated as errors

Now with

CFLAGS="-g -Wall -fno-common -Wextra -Wunused" \
 CXXFLAGS="-g -Wall -I/usr/include"  \
./configure --prefix=/opt/grass \
--enable-largefile --enable-shared \
--with-blas --with-bzlib --with-cairo --with-cxx
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 --with-gdal \
--with-geos --with-lapack --with-netcdf --with-nls \
--with-odbc --with-openmp --with-pdal=no \
--with-postgres
--with-postgres-includes=/usr/include/postgresql \
--with-proj-share=/usr/share/proj --with-readline \
--with-sqlite --with-x --with-zstd

it compiles...

Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Nicklas Larsson via grass-dev
I too would have been surprised if glibc wasn’t there. (I’m shooting from the 
hips :-).

You can investigate the "config.log” for hopefully more detailed information on 
why the math library configure test failed.

> On 24 Jan 2024, at 14:59, Martin Landa  wrote:
> 
> Hi,
> 
> st 24. 1. 2024 v 14:46 odesílatel Nicklas Larsson  > napsal:
>> Another thought, configure fails at locating the math library which is part 
>> of standard C library. If not installed, you’ll probably need `glibc`.
> 
> it would be strange that this core dependency wouldn't be installed by `apt 
> build-dep grass`. I checked:
> 
> martin@katovice:~/src/grass$ apt policy libc6-dev
> libc6-dev:
>   Installed: 2.37-13
>   Candidate: 2.37-13
>   Version table:
>  *** 2.37-13 500
> 500 http://deb.debian.org/debian testing/main amd64 Packages
> 100 /var/lib/dpkg/status
>  
> it should be fine. Martin
> 
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Martin Landa via grass-dev
Hi,

st 24. 1. 2024 v 14:46 odesílatel Nicklas Larsson 
napsal:

> Another thought, configure fails at locating the math library which is
> part of standard C library. If not installed, you’ll probably need `glibc`.
>

it would be strange that this core dependency wouldn't be installed by `apt
build-dep grass`. I checked:

martin@katovice:~/src/grass$ apt policy libc6-dev
libc6-dev:
  Installed: 2.37-13
  Candidate: 2.37-13
  Version table:
 *** 2.37-13 500
500 http://deb.debian.org/debian testing/main amd64 Packages
100 /var/lib/dpkg/status

it should be fine. Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Nicklas Larsson via grass-dev
This link might help:
https://www.debian.org/doc/manuals/debian-reference/ch12.en.html#_coding_in_compiled_languages


> On 24 Jan 2024, at 14:46, Nicklas Larsson  wrote:
> 
> Another thought, configure fails at locating the math library which is part 
> of standard C library. If not installed, you’ll probably need `glibc`.
> 
>> On 24 Jan 2024, at 14:00, Nicklas Larsson via grass-dev 
>>  wrote:
>> 
>> Martin,
>> 
>> Noting that you use a non-default prefix, you may need to add 
>> `LDFLAGS="-L/usr/lib”` (and perhaps add ´”-I/usr/include” to CFLAGS and 
>> CXXFLAGS).
>> The same result could perhaps be reached with `--with-includes=/usr/include 
>> --with-libs=/usr/lib` added to configure, although that I’m not sure of.
>> 
>> 
>> Best,
>> Nicklas
>> 
>> 
>> 
>>> On 24 Jan 2024, at 13:34, Martin Landa via grass-dev 
>>>  wrote:
>>> 
>>> Hi, 
>>> 
>>> I am unable to compile GRASS on Debian testing. The configure fails with:
>>> 
>>> checking for atan... no
>>> checking for atan in -lm... no
>>> configure: error: *** Failed check for math library.
>>> 
>>> I installed dependencies by
>>> 
>>> apt build-dep grass
>>> 
>>> and run
>>> 
>>> CFLAGS="-g -Wall -Werror -fno-common -Wextra -Wunused" \
>>>CXXFLAGS="-g -Wall"  \
>>>./configure --prefix=/opt/grass \
>>> --enable-largefile --enable-shared \
>>> --with-blas --with-bzlib --with-cairo --with-cxx 
>>> --with-freetype \
>>> --with-freetype-includes=/usr/include/freetype2 --with-gdal \
>>> --with-geos --with-lapack --with-netcdf --with-nls \
>>> --with-odbc --with-openmp --with-pdal=no \
>>> --with-postgres 
>>> --with-postgres-includes=/usr/include/postgresql \
>>> --with-proj-share=/usr/share/proj --with-readline \
>>> --with-sqlite --with-x --with-zstd
>>> 
>>> Any idea what could be wrong? Thanks in advance, Martin
>>> 
>>> -- 
>>> Martin Landa
>>> http://geo.fsv.cvut.cz/gwiki/Landa
>>> http://gismentors.cz/mentors/landa
>>> ___
>>> grass-dev mailing list
>>> grass-dev@lists.osgeo.org
>>> https://lists.osgeo.org/mailman/listinfo/grass-dev
>> 
>> ___
>> grass-dev mailing list
>> grass-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-dev
> 

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Nicklas Larsson via grass-dev
Another thought, configure fails at locating the math library which is part of 
standard C library. If not installed, you’ll probably need `glibc`.

> On 24 Jan 2024, at 14:00, Nicklas Larsson via grass-dev 
>  wrote:
> 
> Martin,
> 
> Noting that you use a non-default prefix, you may need to add 
> `LDFLAGS="-L/usr/lib”` (and perhaps add ´”-I/usr/include” to CFLAGS and 
> CXXFLAGS).
> The same result could perhaps be reached with `--with-includes=/usr/include 
> --with-libs=/usr/lib` added to configure, although that I’m not sure of.
> 
> 
> Best,
> Nicklas
> 
> 
> 
>> On 24 Jan 2024, at 13:34, Martin Landa via grass-dev 
>>  wrote:
>> 
>> Hi, 
>> 
>> I am unable to compile GRASS on Debian testing. The configure fails with:
>> 
>> checking for atan... no
>> checking for atan in -lm... no
>> configure: error: *** Failed check for math library.
>> 
>> I installed dependencies by
>> 
>> apt build-dep grass
>> 
>> and run
>> 
>> CFLAGS="-g -Wall -Werror -fno-common -Wextra -Wunused" \
>>CXXFLAGS="-g -Wall"  \
>>./configure --prefix=/opt/grass \
>> --enable-largefile --enable-shared \
>> --with-blas --with-bzlib --with-cairo --with-cxx --with-freetype 
>> \
>> --with-freetype-includes=/usr/include/freetype2 --with-gdal \
>> --with-geos --with-lapack --with-netcdf --with-nls \
>> --with-odbc --with-openmp --with-pdal=no \
>> --with-postgres --with-postgres-includes=/usr/include/postgresql 
>> \
>> --with-proj-share=/usr/share/proj --with-readline \
>> --with-sqlite --with-x --with-zstd
>> 
>> Any idea what could be wrong? Thanks in advance, Martin
>> 
>> --
>> Martin Landa
>> http://geo.fsv.cvut.cz/gwiki/Landa
>> http://gismentors.cz/mentors/landa
>> ___
>> grass-dev mailing list
>> grass-dev@lists.osgeo.org
>> https://lists.osgeo.org/mailman/listinfo/grass-dev
> 
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Martin Landa via grass-dev
Hi Niclas,

st 24. 1. 2024 v 14:00 odesílatel Nicklas Larsson 
napsal:

> Noting that you use a non-default prefix, you may need to add
> `LDFLAGS="-L/usr/lib”` (and perhaps add ´”-I/usr/include” to CFLAGS and
> CXXFLAGS).
> The same result could perhaps be reached with
> `--with-includes=/usr/include --with-libs=/usr/lib` added to configure,
> although that I’m not sure of.
>

Thanks for your feedback! I tried everything you suggested:

 CFLAGS="-g -Wall -Werror -fno-common -Wextra -Wunused -I/usr/include" \
 CXXFLAGS="-g -Wall -I/usr/include"  \
  LDFLAGS="-L/usr/lib" \
./configure --prefix=/opt/grass \
--with-includes=/usr/include --with-libs=/usr/lib \
--enable-largefile --enable-shared \
--with-blas --with-bzlib --with-cairo --with-cxx
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 --with-gdal \
--with-geos --with-lapack --with-netcdf --with-nls \
--with-odbc --with-openmp --with-pdal=no \
--with-postgres
--with-postgres-includes=/usr/include/postgresql \
--with-proj-share=/usr/share/proj --with-readline \
--with-sqlite --with-x --with-zstd

But unfortunately it didn't help. Best, Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Nicklas Larsson via grass-dev
Martin,

Noting that you use a non-default prefix, you may need to add 
`LDFLAGS="-L/usr/lib”` (and perhaps add ´”-I/usr/include” to CFLAGS and 
CXXFLAGS).
The same result could perhaps be reached with `--with-includes=/usr/include 
--with-libs=/usr/lib` added to configure, although that I’m not sure of.


Best,
Nicklas



> On 24 Jan 2024, at 13:34, Martin Landa via grass-dev 
>  wrote:
> 
> Hi, 
> 
> I am unable to compile GRASS on Debian testing. The configure fails with:
> 
> checking for atan... no
> checking for atan in -lm... no
> configure: error: *** Failed check for math library.
> 
> I installed dependencies by
> 
> apt build-dep grass
> 
> and run
> 
> CFLAGS="-g -Wall -Werror -fno-common -Wextra -Wunused" \
>CXXFLAGS="-g -Wall"  \
>./configure --prefix=/opt/grass \
> --enable-largefile --enable-shared \
> --with-blas --with-bzlib --with-cairo --with-cxx --with-freetype \
> --with-freetype-includes=/usr/include/freetype2 --with-gdal \
> --with-geos --with-lapack --with-netcdf --with-nls \
> --with-odbc --with-openmp --with-pdal=no \
> --with-postgres --with-postgres-includes=/usr/include/postgresql \
> --with-proj-share=/usr/share/proj --with-readline \
> --with-sqlite --with-x --with-zstd
> 
> Any idea what could be wrong? Thanks in advance, Martin
> 
> --
> Martin Landa
> http://geo.fsv.cvut.cz/gwiki/Landa
> http://gismentors.cz/mentors/landa
> ___
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev

___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] configurare fails: Failed check for math library

2024-01-24 Thread Martin Landa via grass-dev
Hi,

I am unable to compile GRASS on Debian testing. The configure fails with:

checking for atan... no
checking for atan in -lm... no
configure: error: *** Failed check for math library.

I installed dependencies by

apt build-dep grass

and run

CFLAGS="-g -Wall -Werror -fno-common -Wextra -Wunused" \
   CXXFLAGS="-g -Wall"  \
   ./configure --prefix=/opt/grass \
--enable-largefile --enable-shared \
--with-blas --with-bzlib --with-cairo --with-cxx
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 --with-gdal \
--with-geos --with-lapack --with-netcdf --with-nls \
--with-odbc --with-openmp --with-pdal=no \
--with-postgres
--with-postgres-includes=/usr/include/postgresql \
--with-proj-share=/usr/share/proj --with-readline \
--with-sqlite --with-x --with-zstd

Any idea what could be wrong? Thanks in advance, Martin

-- 
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
___
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev