[Pkg-pascal-devel] need advice: unable to create package output directory "/usr/..."

Yaroslav Halchenko yoh at onerussian.com
Thu Jan 13 14:14:43 GMT 2022


Dear Pascal Gurus,

I am working with upstream trying to package mricrogl.
Packaging here https://salsa.debian.org/med-team/mricrogl

We (with me knowing not much about Pascal build system) followed
packaging of older mricron, and debian/rules contains

	# lazbuild really wants to modify some configs during initial lazbuild
	# so we will provide a fake HOME dir
	export HOME=$(CURDIR)/build


	# one ring to rule them all ...
	%:
		dh $@


	override_dh_auto_build:
		mkdir -p $(CURDIR)/build
		lazbuild --add-package lazopenglcontext
		lazbuild --build-all --ws=qt5 --pcp=/etc/lazarus MRIcroGL.lpi
		mv ./MRIcroGL mricrogl

and then during a proper sanitized build using cowbuilder in sid
(lcl-utils 2.0.12+dfsg-6) I get

	debian/rules override_dh_auto_build
	make[1]: Entering directory '/build/mricrogl-1.2.20211007+dfsg'
	mkdir -p /build/mricrogl-1.2.20211007+dfsg/build
	lazbuild --add-package lazopenglcontext
	CopySecondaryConfigFile /etc/lazarus/environmentoptions.xml -> /build/mricrogl-1.2.20211007+dfsg/build/.lazarus/environmentoptions.xml
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
	lazbuild --build-all --ws=qt5 --pcp=/etc/lazarus MRIcroGL.lpi
	SetPrimaryConfigPath NewValue="/etc/lazarus" -> "/etc/lazarus"
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP"
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas"
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-iWTOTP" "-Px86_64" "-Tlinux"
	Hint: (lazarus) [RunTool] "/usr/bin/fpc" "-va" "compilertest.pas" "-Px86_64" "-Tlinux"
	Hint: (lazarus) Missing state file of LazOpenGLContext 0.0.1: /usr/lib/lazarus/2.0.12/components/opengl/lib/x86_64-linux/qt5/LazOpenGLContext.compiled
	Error: (lazarus) unable to create package output directory "/usr/lib/lazarus/2.0.12/components/opengl/lib/x86_64-linux/qt5" of package "LazOpenGLContext 0.0.1"
	Hint: (lazarus) normal output directory of package LazOpenGLContext 0.0.1 is not writable: "/usr/lib/lazarus/2.0.12/components/opengl/lib/x86_64-linux/qt5/"
	TParsedCompilerOptions.SetOutputDirectoryOverride New=/etc/lazarus/lib/LazOpenGLContext/lib/x86_64-linux/qt5
	Hint: (lazarus) Missing state file of LazOpenGLContext 0.0.1: /etc/lazarus/lib/LazOpenGLContext/lib/x86_64-linux/qt5/LazOpenGLContext.compiled
	Error: (lazarus) unable to create package output directory "/etc/lazarus/lib/LazOpenGLContext/lib/x86_64-linux/qt5" of package "LazOpenGLContext 0.0.1"
	Error: (lazarus) [TLazPackageGraph.PreparePackageOutputDirectory] failed to create writable directory: /etc/lazarus/lib/LazOpenGLContext/lib/x86_64-linux/qt5
	Error: (lazarus) [TLazPackageGraph.CompilePackage] PreparePackageOutputDirectory failed: LazOpenGLContext 0.0.1
	Error: (lazbuild) Project dependencies of /build/mricrogl-1.2.20211007+dfsg/MRIcroGL.lpi
	make[1]: *** [debian/rules:19: override_dh_auto_build] Error 2
	make[1]: Leaving directory '/build/mricrogl-1.2.20211007+dfsg'


so the first --add-package seems to be ok, but then subsequent
--build-all wants to change system-wide files.

Is there a better/proper way to fix this or it is some issue within lazbuild?
(searched up some older
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=906349 which might
relate)

thanks in advance and please keep me in CC (not subscribed to the list).

Cheers,
-- 
Yaroslav O. Halchenko
Center for Open Neuroscience     http://centerforopenneuroscience.org
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
WWW:   http://www.linkedin.com/in/yarik        




More information about the Pkg-pascal-devel mailing list