Packaging lix for openSUSE: build fails with "cannot find -llix_doc: No such file or directory" #475
	
		Labels
		
	
	
	
	No labels
	
		
			
	
	Affects/CppNix
		
			Affects/Nightly
		
			Affects/Only nightly
		
			Affects/Stable
		
			Area/build-packaging
		
			Area/cli
		
			Area/evaluator
		
			Area/fetching
		
			Area/flakes
		
			Area/language
		
			Area/lix ci
		
			Area/nix-eval-jobs
		
			Area/profiles
		
			Area/protocol
		
			Area/releng
		
			Area/remote-builds
		
			Area/repl
		
			Area/repl/debugger
		
			Area/store
		
			bug
		
			Context
contributors
		
			Context
drive-by
		
			Context
maintainers
		
			Context
RFD
		
			crash 💥
		
			Cross Compilation
		
			devx
		
			docs
		
			Downstream Dependents
		
			E/easy
		
			E/hard
		
			E/help wanted
		
			E/reproducible
		
			E/requires rearchitecture
		
			Feature/S3
		
			imported
		
			Language/Bash
		
			Language/C++
		
			Language/NixLang
		
			Language/Python
		
			Language/Rust
		
			Needs Langver
		
			OS/Linux
		
			OS/macOS
		
			performance
		
			regression
		
			release-blocker
		
			stability
		
			Status
blocked
		
			Status
invalid
		
			Status
postponed
		
			Status
wontfix
		
			testing
		
			testing/flakey
		
			Topic/Large Scale Installations
		
			ux
		
		
	
		No milestone
		
			
		
	No project
	
		
	
	
	
	
		No assignees
		
	
	
		
			
		
	
	
	
		2 participants
	
	
		
		
	Notifications
	
		
	
	
	
		
	
	
	Due date
No due date set.
	
		Dependencies
		
		
	
	
	No dependencies set.
	
	
		
	
	
		
			Reference
		
	
	
		
	
	
			lix-project/lix#475
			
		
	
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	
	No description provided.
		
		Delete branch "%!s()"
	 
	Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I am trying to package lix for openSUSE. I have all of the dependencies and got the build to start (with the workaround from #470).
However, the build fails:
The package is here: https://build.opensuse.org/package/show/home:ojkastl_buildservice:Branch_devel_tools/lix
The full buildlog is here: https://build.opensuse.org/package/live_build_log/home:ojkastl_buildservice:Branch_devel_tools/lix/openSUSE_Tumbleweed/x86_64
I tried to translate the
justbuild commands tomesonto have one layer of abstraction less. That should not be the problem.I think I need to set the
$mesonFlagsto setenable-docsto true, if I understand the part in thepackages.nixfile correctly.(lib.mesonBool "enable-docs" canRunInstalled)Maybe the README could be expanded to contain a safe set of
$mesonFlagsfor builds on non-NixOS machines?Kind Regards,
Johannes
this is poor documentation, but what you're actually experiencing here is that we punted on the issue of compiling lix-doc/ with meson for the sake of time. this will be fixed in the in-development 2.92 release by building it with meson instead.
the piece of packaging that you're missing is lix-doc/package.nix, which just builds lix-doc as a rust staticlib. this is then put in the linker search path by nix magic in our case, but you probably have to jam in LDFLAGS in your case.
this is not related to enable-docs, actually. lix-doc is part of nix repl, and it's kind of an evil little trap that we carelessly set to have it not be declared as a meson dependency anywhere so it randomly fails to link if you've not injected it into the link search path.
i would not make it a separate package for opensuse, it is an implementation detail of lix that just is built as a separate package in our case because of technical limitations in nix plus it having been the most expedient thing to do at the time, when we weren't meson-only.
the actual thing enable-docs is saying that you're reading is "enable the documentation if the building system can run the host-platform code" i.e. it's not cross compilation. this is because of settings default values/docs and a bunch of other stuff that is extracted from the nix binary and put into the manual. we consider this technical debt that will be eliminated given sufficient time.
also related: #258
Thanks for the fast reply. Is there any flag I can set to skip the lix-doc part when building with meson?
Thanks for the detailed explanation. If I understand you correctly I would first compile the nix-docs, before I compile lix. All within the same openSUSE package and from the same git repository?
If this is work in the making, then I will wait for 2.92 to be released and try again then.
Have a nice day!
Johannes
No. It is a required part of the program that is necessary for proper repl functionality. You have to
cargo buildit outside of meson, currently, then provide it somewhere in the linking search path so the linking command you saw fail above will work.OK, I'll try that and report back. Thanks, @jade
Solved by building first and then adding the path to
LIBRARY_PATH: