Skip to content

Commit

Permalink
debian packaging: update libpython detection also on sid (followup 49…
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 8, 2020
1 parent 8addbde commit 722dd8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions debian/rules
Expand Up @@ -73,10 +73,10 @@ else
TESTMAKE=ninja $(NINJA_OPTS)
endif

ifeq (,$(findstring $(DISTRIBUTION),"focal"))
ifeq (,$(findstring $(DISTRIBUTION),"focal sid"))
PYTHON_LIBRARY=$(shell python3-config --ldflags | sed -e 's\#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$\#\1/lib\2.so\#')
else
PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so
PYTHON_LIBRARY=$(shell python3-config --ldflags --embed | sed -e 's\#-L\(.*\) -L/usr/lib -l\([^ ]*\) .*$$\#\1/lib\2.so\#')
endif

CMAKE_OPTS := \
Expand Down

1 comment on commit 722dd8a

@tudorbarascu
Copy link
Member

@tudorbarascu tudorbarascu commented on 722dd8a Apr 8, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Later update: Of course it was my bad :( (environment variable in the Docker file.. at the end...). Sorry for the noise.

@jef-n Hi Jurgen, while building packages in a focal docker I had the following error which led me here:

-- Build files have been written to: /qgis/QGIS/debian/build
make[1]: Leaving directory '/qgis/QGIS'
   debian/rules override_dh_auto_build
make[1]: Entering directory '/qgis/QGIS'
ninja -v -j8 -C debian/build
ninja: Entering directory `debian/build'
ninja: error: '-L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu', needed by 'output/lib/libqgispython.so.3.13.0', missing and no known rule to make it
make[1]: *** [debian/rules:249: override_dh_auto_build] Error 1
make[1]: Leaving directory '/qgis/QGIS'
make: *** [debian/rules:231: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

I solved it by going back to the previous commit..: PYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython3.8.so
Just FYI as I tried understanding how the regex should have worked on this output and maybe fix it (if it needs fixing) but I failed miserably.

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

From what I understand, on focal, the configuring outputs '-L/usr/lib/python3.8/config-3.8-x86_64-linux-gnu instead of -L/usr/lib/x86_64-linux-gnu/libpython3.8.so

Hope it helps and that I didn't make any noise for nothing. Thank you for your great work.

Please sign in to comment.