SGL-UT / GPSTk

ATTENTION: This repository has been moved and is for archival purposes only. GPSTk toolkit has been renamed to GNSSTK and has been split into two new separate repositories. GNSSTK now only contains libraries while the other repository GNSSTK-APPS contains only applications. The rename and split into libraries and applications started with version v12.0.0 on September 2021. GPSTk --> GNSSTK at https://gitlab.com/sgl-ut/gnsstk --> GNSSTK-APPS at https://gitlab.com/sgl-ut/gnsstk-apps
Other
339 stars 182 forks source link

Doesn't compile in ubuntu #75

Closed tyalie closed 3 years ago

tyalie commented 3 years ago

The library doesn't compile under Ubuntu 20.04.

I've tried compiling the v8.0.0 tag, but the process crashes due to a target that cannot be compiled. I was able to trace it back to the PythonSetup.cmake with this line:

set(PYTHON_LIBRARIES "${_python_libdir}/lib${_python_libname}.so")

In summary the _ptthon_libdir and _python_libname are both empty due to the failing regex matching in the line above:

string(REGEX MATCH "-L([^ ]*) -l([^ ]*) " _python_libdir ${PYTHON_LDFLAGS})

The PYTHON_LDFLAGS variable is

# python3-config --ldflags
-L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu -L/usr/lib  -lcrypt -lpthread -ldl  -lutil -lm -lm

I honestly have no idea, what you're trying to do here. The regex above would match /usr/lib and crypt (if it worked), but I doubt that is what you wanted.

tyalie commented 3 years ago

Okay. I've found the issue: that is a double space between -L/usr/lib and -lcrypt. But still: Are those the paths you want?

EDIT: I think I've figured it out. You wanted to have the path to the libpython3.8.so. Interesting.