[GRASS-dev] Errors compiling main on Ubuntu 22.04

Dear all,

this morning compiling the main branch I am getting a couple errors:

GRASS GIS 8.5.0dev 4014208b4 compilation log

···

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.

Could you try cleaning with « make libsclean clean distclean » beforehand? (The libsclean is the part I want you to try)

Edouard Choinière

···

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.


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

Salut Edouard,

thank you for the swift reply. Indeed that sorted things out.

Best.

···

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.

On Monday, July 29th, 2024 at 10:41 AM, Edouard Choinière e.chs@outlook.com wrote:

Could you try cleaning with « make libsclean clean distclean » beforehand? (The libsclean is the part I want you to try)

Edouard Choinière

Le 29 juill. 2024 à 05:35, Luí­s Moreira de Sousa via grass-dev grass-dev@lists.osgeo.org a écrit :

Dear all,

this morning compiling the main branch I am getting a couple errors:

GRASS GIS 8.5.0dev 4014208b4 compilation log

Started compilation: ma 29 jul 2024 10:11:18 WEST

Errors in:
/home/lads/git/grass/vector/v.profile
/home/lads/git/grass/vector/v.select

In case of errors please change into the directory with error and run ‘make’.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

Finished compilation: ma 29 jul 2024 10:15:45 WEST
make: *** [Makefile:71: default] Error 1

I proceeded as instructed:

$ cd /home/lads/git/grass/vector/v.profile
$ make
: && gcc -L/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -L/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -Wl,–export-dynamic -Wl,-rpath-link,/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -Wl,-rpath,/usr/local/grass85/lib -o /home/lads/git/grass/dist.x86_64-pc-linux-gnu/bin/v.profile OBJ.x86_64-pc-linux-gnu/main.o OBJ.x86_64-pc-linux-gnu/processors.o -lgrass_vector.8.5 -lgrass_dbmiclient.8.5 -lgrass_dbmibase.8.5 -lgrass_gis.8.5 -lm
/usr/bin/ld: OBJ.x86_64-pc-linux-gnu/main.o: undefined reference to symbol ‘GEOSBufferParams_create’
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeos_c.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** […/…/include/Make/Module.make:18: /home/lads/git/grass/dist.x86_64-pc-linux-gnu/bin/v.profile] Error 1

This discussion at StackOverflow [0] indicates arguments missing to gcc. Compiling v.select returns the same error message.

Could this be something missing from my config? Or is it a real issue that should be reported?

Thank you.

[0] https://stackoverflow.com/questions/19901934/libpthread-so-0-error-adding-symbols-dso-missing-from-command-line

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.


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

So, if libsclean was the part that made it work, we might have to look at running it on distclean (if distclean is commonly used as a « super clean »).

Edouard Choinière

···

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.

On Monday, July 29th, 2024 at 10:41 AM, Edouard Choinière e.chs@outlook.com wrote:

Could you try cleaning with « make libsclean clean distclean » beforehand? (The libsclean is the part I want you to try)

Edouard Choinière

Le 29 juill. 2024 à 05:35, Luí­s Moreira de Sousa via grass-dev grass-dev@lists.osgeo.org a écrit :

Dear all,

this morning compiling the main branch I am getting a couple errors:

GRASS GIS 8.5.0dev 4014208b4 compilation log

Started compilation: ma 29 jul 2024 10:11:18 WEST

Errors in:
/home/lads/git/grass/vector/v.profile
/home/lads/git/grass/vector/v.select

In case of errors please change into the directory with error and run ‘make’.
If you get multiple errors, you need to deal with them in the order they
appear in the error log. If you get an error building a library, you will
also get errors from anything which uses the library.

Finished compilation: ma 29 jul 2024 10:15:45 WEST
make: *** [Makefile:71: default] Error 1

I proceeded as instructed:

$ cd /home/lads/git/grass/vector/v.profile
$ make
: && gcc -L/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -L/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -Wl,–export-dynamic -Wl,-rpath-link,/home/lads/git/grass/dist.x86_64-pc-linux-gnu/lib -Wl,-rpath,/usr/local/grass85/lib -o /home/lads/git/grass/dist.x86_64-pc-linux-gnu/bin/v.profile OBJ.x86_64-pc-linux-gnu/main.o OBJ.x86_64-pc-linux-gnu/processors.o -lgrass_vector.8.5 -lgrass_dbmiclient.8.5 -lgrass_dbmibase.8.5 -lgrass_gis.8.5 -lm
/usr/bin/ld: OBJ.x86_64-pc-linux-gnu/main.o: undefined reference to symbol ‘GEOSBufferParams_create’
/usr/bin/ld: /lib/x86_64-linux-gnu/libgeos_c.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** […/…/include/Make/Module.make:18: /home/lads/git/grass/dist.x86_64-pc-linux-gnu/bin/v.profile] Error 1

This discussion at StackOverflow [0] indicates arguments missing to gcc. Compiling v.select returns the same error message.

Could this be something missing from my config? Or is it a real issue that should be reported?

Thank you.

[0] https://stackoverflow.com/questions/19901934/libpthread-so-0-error-adding-symbols-dso-missing-from-command-line

Luís Moreira de Sousa
Mastodon: https://mastodon.social/@luis_de_sousa

URL: https://ldesousa.codeberg.page

Sent with Proton Mail secure email.


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

On Mon, Jul 29, 2024 at 12:02 PM Edouard Choinière via grass-dev
<grass-dev@lists.osgeo.org> wrote:

So, if libsclean was the part that made it work, we might have to look at running it on distclean (if distclean is commonly used as a « super clean »).

Yes, "make distclean" is commonly used as a « super clean ».

So, would this change improve the situation?

index be8834ecf4..81390f0dec 100644
--- a/Makefile
+++ b/Makefile
@@ -124,7 +124,7 @@ code-coverage-clean:
        -find . -type f \( -name "*.gcda" -o -name "*.gcno" -o -name
"*.gcov" \) -delete
        -rm -f .coverage

-distclean: clean
+distclean: libsclean clean
        -rm -f config.cache config.log config.status
config.status.$(ARCH) 2>/dev/null
        -rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
        -rm -f include/grass/config.h include/grass/version.h

Markus

Yes, that would be good. It is doing the « expected » behaviour for a more extensive clean, but looses the granularity meaning of « distclean » that only cleans the dist folder, and libsclean only cleans the compiled grass libs.

Speculating here: Maybe if grass is compiled and installed, not compiling the libs from the repo results in having the system available libs instead. Is there a way to verify that hypothesis?
Something similar happened during the code sprint, when after using libsclean made the next builds work, but I wasn’t able to reproduce like expected afterwards..

Edouard Choinière

Le 30 juill. 2024 à 09:44, Markus Neteler <neteler@osgeo.org> a écrit :

On Mon, Jul 29, 2024 at 12:02 PM Edouard Choinière via grass-dev
<grass-dev@lists.osgeo.org> wrote:

So, if libsclean was the part that made it work, we might have to look at running it on distclean (if distclean is commonly used as a « super clean »).

Yes, "make distclean" is commonly used as a « super clean ».

So, would this change improve the situation?

index be8834ecf4..81390f0dec 100644
--- a/Makefile
+++ b/Makefile
@@ -124,7 +124,7 @@ code-coverage-clean:
       -find . -type f \( -name "*.gcda" -o -name "*.gcno" -o -name
"*.gcov" \) -delete
       -rm -f .coverage

-distclean: clean
+distclean: libsclean clean
       -rm -f config.cache config.log config.status
config.status.$(ARCH) 2>/dev/null
       -rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
       -rm -f include/grass/config.h include/grass/version.h

Markus