PolSARpro installation issue on Ubuntu

Dear all,

I’m having some difficulties installing PolSARpro v6.0 Biomass Edition on my Ubuntu 22.04 64-bit system. I downloaded the PolSARpro zip file from https://ietr-lab.univ-rennes1.fr/polsarpro-bio/ and followed the instructions for a Linux installation (installing all the necessary packages first). The install seems to run through without any stops, but I notice a lot of collect2: error: ld returned 1 exit status messages in the outputs. After the install is completed I do not end up with an icon on the desktop.

When I run PolSARpro using the wish command the program window pop up (screen shot below), but when I press Enter I get an error message (screen shot below). As far as I can tell, the tools folder in Soft/bin is empty. I’ve tried reinstalling and tested with using sudo/not sudo, but still the error persists. Has anyone else experienced this and know how I can fix this issue?

Best regards,
ingridh



error

This can indicate that the POLARSARPRO programs were built using different runtime library versions.
This is quite common when you run a program built for an older linux version on a current system. Unless there are pressing reasons (e.g., the old library had security issues) there are usually ways to support programs build for the previous version, but some research may be needed.

It is a bit unusual for linux programs have a .exe extension. You can check that you have linux binaries in a terminal using the file command:

$ file <full path to program>

You may be able to install the required versions of the libraries. You can get more details in a terminal from the ldd command, e.g.:

$ ldd <full path to program>

If this indicates that some libraries are not found, you can ask for advice on Ubuntu forums.

hello,
I have the same problem, in the Soft/bin directory are just a view exe files
all other like the one mentioned above are not compiled at all.
is there somewhere a list of package-versions which i should use to compile polsarpro
best regards
gof

Thank you for your quick reply. I’m not so well-versed in Linux and Ubuntu, so maybe I have to resort to installing PolSARpro on my windows computer instead as I doubt I’ll be able to figure out these issues without very clear instructions :slight_smile:

Do you know how I can uninstall PolSARpro from my Ubuntu system? I see no obvious way to do so. I’ve tried looking into the Compil_PolSARpro_Biomass_Edition_Linux.sh file and I see there are some make Makefile_xxx.linux commands in the compile file, but I’m not able to run make uninstall Makefile_xxx.linux (only get a

make: *** No rule to make target uninstall'. Stop.

message.)

I also want to add that I looked a bit closer at the installation output and it seems like most of the errors are “Multiple definition of XXX” “first defined here” errors.

Best regards,
Ingrid

Hi @gnwiii Thanks for the reply. Indeed your suspicion is right. But how do I go about checking the linux binaries here. I have a zipped file which is downloaded from this link here: PolSARpro v6.0 (Biomass Edition) | Institut d'Électronique et des Techniques du numéRique - UMR CNRS 6164
I dont know how to use file command here, on which folder, what is here. It is simply bunch of files some executable, make files, folders and so on.
Once, I understand this program as you described above, I will have to run ldd to find the right version.

@gof Did you manage to resolve this? @ingridh described the error quite well, I have the same issue on my ubuntu.

You need to extract the contents of the zip archive and find the binary executable files. You can use the file command to distinguish between scripts and binary programs:

$ file /bin/bash /etc/profile
/bin/bash:    ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=15780967f1c6ffb422b5832185766bee364d3c71, for GNU/Linux 3.2.0, stripped
/etc/profile: ASCII text

Once you have found a few binary programs, use ldd to list the required libraries:

$ ldd /bin/bash
	linux-vdso.so.1 (0x00007ffddc705000)
	libtinfo.so.6 => /lib64/libtinfo.so.6 (0x00007f1a7983d000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f1a7965f000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f1a799ee000)

Linux usually supports running binaries built on at least one previous release, but you may need to install older versions of some libraries. You also use older releases with lightweight virtualization (docker, podman).

Hi there, I casually (well not so properly :slight_smile: ) built today the 6.0.3 version on Debian 12, I suspect the same issue applies to any Linux with a modern GCC (i.e. 10+). Polsar Makefiles needs to consider changes in the GCC toolchain that now assumes -fno-common or fix sources to use extern declaration when due. An easy fix is adding -fcommon to every CFLAGS arg, which is what I did a few minutes ago to have a working build.

/me with my Debian Developer hat on.

Eventually consider to send me a note for clarification about patching, just in case.

-cheers

PS: I created a mirror of the sources for Linux on Github here including a patch to allow building on a current Linux system.

1 Like

Amazing thanks @fpl