Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voidlinux package #975

Open
1 of 3 tasks
eoli3n opened this issue Dec 26, 2020 · 31 comments · Fixed by #982
Open
1 of 3 tasks

Voidlinux package #975

eoli3n opened this issue Dec 26, 2020 · 31 comments · Fixed by #982

Comments

@eoli3n
Copy link

eoli3n commented Dec 26, 2020

I'm trying to package nx-libs-full for Voidlinux.
void-linux/void-packages#27432

X86_64 and i686 glibc builds are successful, but all other arch fails.
Gentoo package limits to some arch too : https://packages.gentoo.org/packages/net-misc/nx

Is there a way to compile nx-libs for other arch ?


TODO:

@eoli3n
Copy link
Author

eoli3n commented Dec 26, 2020

https://pkgs.alpinelinux.org/packages?name=nx-libs

Found this, lets try.

@eoli3n
Copy link
Author

eoli3n commented Dec 27, 2020

Native systems for i686 and x86_64-musl successfully build nx-libs with some patches.
You could patch that one upstream to support musl builds ? https://github.com/void-linux/void-packages/pull/27432/files#diff-6380819becd9c72810dab07c4d179831eeb7c63101a2e2888c66aef5a967c3b8

I can't get cross compilation working, still trying.

@uli42
Copy link
Member

uli42 commented Dec 28, 2020 via email

@eoli3n
Copy link
Author

eoli3n commented Dec 28, 2020

the other files. Does it make sense to add them to nx-libs?

There are template files to build package for Voidlinux, so no, its part of https://github.com/void-linux/void-packages

Development is done on x86_64 with occasional builds for i386. So it is not surprising if it does not work out of the box for other archs.

But this seems to work for Alpine Linux which build for all arch but only for musl, and not glibc.
I sent a mail to the maintainer of alpine linux package, to get some help, and know how Alpine linux package succeeded to build.

If you're ok, it would be great to adapt nx-libs upstream to let it be cross compilable.

@ndowens
Copy link

ndowens commented Dec 28, 2020

The reason cross-building fails is because of the use of, what looks like use of imake: which imake 1>/dev/null && imake -I./config/cf -w -j1 -s xmakefile -DTOPDIR=. -DCURDIR=. 132 sh: /tmp/imakeFsAJpE: cannot execute binary file: Exec format error 133

If this could be replaced by something that don't need to execute a binary, should fix cross-building.

@eoli3n
Copy link
Author

eoli3n commented Dec 28, 2020

You would patch also
https://github.com/ArcticaProject/nx-libs/blob/3.6.x/nx-X11/config/cf/site.def#L72
Is there a way to let it use PREFIX ?


Another thing is:

https://github.com/void-linux/void-packages/blob/master/common/build-style/gnu-makefile.sh
This is the script which is used to build packages.
When I use it, it doesn't build out of the box.
I need to redefine do_build

do_build() {
	make ${makejobs} PREFIX=/usr \
		CONFIGURE="./configure ${configure_args} --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --includedir=/usr/include"
}

I will give more details about that one later.

@uli42
Copy link
Member

uli42 commented Dec 28, 2020 via email

@eoli3n
Copy link
Author

eoli3n commented Dec 28, 2020

this imake error looks strange, can you provide some more details of
what is failing here?

As said, we are cross compiling for all arch under x86_64, so when running the binary, arch dismatch.

@eoli3n
Copy link
Author

eoli3n commented Dec 28, 2020

It seems that we can't run autoreconf -fi in the root dir, which breaks the gnu-makefile.sh script.
As @ndowens said on IRC, you should provide a configure.ac file in the root dir, instead of cd $dir && autoreconf....

@ndowens
Copy link

ndowens commented Dec 29, 2020

It seems that we can't run autoreconf -fi in the root dir, which breaks the gnu-makefile.sh script.
As @ndowens said on IRC, you should provide a configure.ac file in the root dir, instead of cd $dir && autoreconf....

the configure.ac in rootdir is broken, one of the issues as it is written looks for includes/

@uli42
Copy link
Member

uli42 commented Dec 29, 2020 via email

@uli42
Copy link
Member

uli42 commented Dec 29, 2020 via email

@eoli3n
Copy link
Author

eoli3n commented Dec 29, 2020

I have checked the imake source code. It supports a crosscompiling. So
maybe it could help to build an arch dependent imake first.

I can't find anything related to imake crosscompilation, only one thread about someone facing the same problem.
https://forums.gentoo.org/viewtopic-t-422306-start-0.html
As you said, we will not spent time on building with something you want to drop.
Other archs will wait for a nx-libs automake version.

I see 3 things to improve:

  • Drop imake for automake: crossbuild for arm -> WIP Xserver autotools #946
  • Patch mesa and bigfont: native musl builds -> @uli42 Do you want a PR or you do it ?
  • configure.ac at root level instead of subdirs: fix build_style=gnu-makefile -> if @ndowens find a way to fix this, I would help

@uli42
Copy link
Member

uli42 commented Dec 29, 2020 via email

@eoli3n eoli3n mentioned this issue Dec 29, 2020
@ndowens
Copy link

ndowens commented Dec 29, 2020

We want to drop the imake support and switch to automake everywhere. However, we are lacking resources so this has been on low prio for some time. We need some more polishing/updating, but generally this is close t being completed: #946 After that PREFIX should be working. It might be possible to handle PREFIX in the imake build setup (this is the stuff in the config subdir) but we do not want to spend time for imake anymore. Patches, also for the imake stuff, are welcome nevertheless. Uli PS: this imake error looks strange, can you provide some more details of what is failing here?

On Mon, Dec 28, 2020 at 5:43 PM Jonathan Kirszling @.***> wrote: You would patch also https://github.com/ArcticaProject/nx-libs/blob/3.6.x/nx-X11/config/cf/site.def#L72 Is there a way to let it use PREFIX ? ------------------------------ Another thing is: https://github.com/void-linux/void-packages/blob/master/common/build-style/gnu-makefile.sh This is the script which is used to build packages. When I use it, it doesn't build out of the box. I need to redefine do_build do_build() { make ${makejobs} PREFIX=/usr \ CONFIGURE="./configure ${configure_args} --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --includedir=/usr/include" } — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#975 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQHBZG4WUSBZJNNSXVQH5TSXCYUFANCNFSM4VJYQG6A .

I pulled the patches I needed, excluding gitignore/debian and other non-essentials out and it seems fine.

@eoli3n
Copy link
Author

eoli3n commented Dec 30, 2020

EDIT: I added a TODO to the top issue.

@eoli3n
Copy link
Author

eoli3n commented Dec 30, 2020

@uli42 I can't find from source build instructions

@uli42
Copy link
Member

uli42 commented Dec 30, 2020 via email

@eoli3n
Copy link
Author

eoli3n commented Dec 30, 2020

I'm sorry, i can't find anything related to build from source for any distribution:

  • Building Under Fedora or EPEL using Mock
  • Building for openSUSE using OBS Build
  • Building Under Debian or Ubuntu using debuild
  • Building on Windows
  • Binary Builds
    • Debian/Ubuntu
    • RedHat based

@uli42
Copy link
Member

uli42 commented Dec 30, 2020 via email

@eoli3n
Copy link
Author

eoli3n commented Dec 30, 2020

Please help me to help :) I want to know which commands I need to run to build manually nx-libs for void linux which is not Fedora|openSuse|Debian|Ubuntu|Windows

@uli42
Copy link
Member

uli42 commented Dec 30, 2020 via email

@mjtrangoni
Copy link
Member

@eoli3n,

You can take a look at the .travis-ci.yml file. We are building the sources there.

@eoli3n
Copy link
Author

eoli3n commented Dec 30, 2020

Thanks @uli42 @mjtrangoni
I tried to understand why we need to void-linux/void-packages@ebe0d96#diff-531d9cde29e038f06c7fb967c5314cb4d4d11fa8d9c0159802bef4779f30904eR25-R46

It seems that I misunderstood some things and that there is nothing to improve here.

@eoli3n
Copy link
Author

eoli3n commented Jan 16, 2021

Still some work to merge on imake drop to be able to cross build the project.
Would you reopen please ?

@sunweaver
Copy link
Member

sunweaver commented Jan 16, 2021 via email

@eoli3n
Copy link
Author

eoli3n commented Jan 16, 2021

I did, at the top of this issue.
Missing WIP #946

@eoli3n
Copy link
Author

eoli3n commented May 11, 2021

nxagent don't run graphically

[user@voidlinux ~]$ nxagent -ac :1

NXAGENT - Version 3.5.99.26

Copyright (c) 2001, 2011 NoMachine (http://www.nomachine.com)
Copyright (c) 2008-2014 Oleksandr Shneyder <[email protected]>
Copyright (c) 2011-2016 Mike Gabriel <[email protected]>
Copyright (c) 2014-2016 Ulrich Sibiller <[email protected]>
Copyright (c) 2014-2016 Mihai Moldovan <[email protected]>
Copyright (c) 2015-2016 Qindel Group (http://www.qindel.com)
See https://github.com/ArcticaProject/nx-libs for more information.

Info: Agent running with pid '29051'.
Session: Starting session at 'Tue May 11 13:34:29 2021'.
Info: Using alpha channel in render extension.
nxagent: xcb_io.c:617: _XAllocID: Assertion `ret != inval_id' failed.
Aborted

[user@voidlinux ~]$ ldd $(which nxagent)
	linux-vdso.so.1 (0x00007ffdb418a000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f8d6809c000)
	libXcomp.so.3 => /usr/lib/libXcomp.so.3 (0x00007f8d67f6f000)
	libXcompshad.so.3 => /usr/lib/libXcompshad.so.3 (0x00007f8d67f61000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f8d67d57000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f8d67b51000)
	libXfont2.so.2 => /usr/lib/libXfont2.so.2 (0x00007f8d67b16000)
	libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007f8d67b0f000)
	libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007f8d6790c000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f8d67904000)
	libNX_X11.so.6 => /usr/lib/libNX_X11.so.6 (0x00007f8d677bc000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f8d677a7000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f8d67590000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f8d67449000)
	libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007f8d67436000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f8d672d0000)
	libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007f8d67228000)
	libtirpc.so.3 => /usr/lib/libtirpc.so.3 (0x00007f8d671f9000)
	libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007f8d671c4000)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f8d67138000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f8d66f72000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f8d66f47000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f8d66f41000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f8d66f20000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f8d66cb7000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f8d66c9b000)
	libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007f8d66c96000)
	libXrandr.so.2 => /usr/lib64/libXrandr.so.2 (0x00007f8d66c89000)
	libXtst.so.6 => /usr/lib64/libXtst.so.6 (0x00007f8d66a83000)
	libfontenc.so.1 => /usr/lib/libfontenc.so.1 (0x00007f8d66a79000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f8d669c5000)
	/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8d687a0000)
	libicui18n.so.67 => /usr/lib/libicui18n.so.67 (0x00007f8d666bf000)
	libicuuc.so.67 => /usr/lib/libicuuc.so.67 (0x00007f8d664d6000)
	libicudata.so.67 => /usr/lib/libicudata.so.67 (0x00007f8d664d1000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f8d664a8000)
	libgssapi_krb5.so.2 => /usr/lib/libgssapi_krb5.so.2 (0x00007f8d66454000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f8d6644f000)
	libbz2.so.1 => /usr/lib/libbz2.so.1 (0x00007f8d6643c000)
	libkrb5.so.3 => /usr/lib/libkrb5.so.3 (0x00007f8d66365000)
	libk5crypto.so.3 => /usr/lib/libk5crypto.so.3 (0x00007f8d66336000)
	libcom_err.so.2 => /usr/lib/libcom_err.so.2 (0x00007f8d6632e000)
	libkrb5support.so.0 => /usr/lib/libkrb5support.so.0 (0x00007f8d6631f000)
	libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f8d66305000)

I read somewhere that it should not use libX11, right ?

@uli42
Copy link
Member

uli42 commented May 11, 2021 via email

@eoli3n
Copy link
Author

eoli3n commented May 11, 2021

please show me what i'm searching for : https://github.com/ArcticaProject/nx-libs/blob/3.6.x/nx-X11/programs/Xserver/Imakefile
As you can see in the linked issue, i'm spending a lot of time on this, i'm trying to package x2goserver, but i'm discovering voidlinux, builds, packaging, nx-libs et the whole mechanic, i need concrete help without having to guess informations.

@uli42
Copy link
Member

uli42 commented May 11, 2021

Sorry, my fault, it should have been RPATH, not ROATH. Have a look at #610 for an explanation and the resulting patch. You must adapt the RPATH aber building your binary in a similar fashion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants