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

Build instructions do not work anymore #106

Closed
alex3305 opened this issue Apr 18, 2023 · 10 comments
Closed

Build instructions do not work anymore #106

alex3305 opened this issue Apr 18, 2023 · 10 comments
Labels
documentation Improvements or additions to documentation

Comments

@alex3305
Copy link

Hi 👋 ,

I was working on creating a Docker container based on the deprecated LinuxServer.io version, however building does not work anymore. At least not following the current instructions in the project Readme:

https://github.com/nzbget-ng/nzbget/blob/a70a383c9db50cc5b5f122cc5a52ec4dc9c9abd7/README.md?plain=1#L112-L143

Can you please update the build instructions or provide me on how to build this?

Thank you ❤️

@Mouton99
Copy link

Here's my own modified version of linuxserver/nzbget's Dockerfile that I have been using for a few weeks now : Mouton99/docker-nzbget-ng@6c440d5#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557

@paul-chambers paul-chambers self-assigned this May 1, 2023
@paul-chambers paul-chambers added the documentation Improvements or additions to documentation label May 1, 2023
@paul-chambers
Copy link

paul-chambers commented May 1, 2023

Just do a plain make after the clone.

The previous maintainer had checked in several intermediate files that should be freshly auto-generated by autotools. Since the project hadn't been touched in years, those checked-in auto-generated files were well out-of-date with respect to the versions of autotools installed on current distros.

They should not have been checked in in the first place, they are supposed to be generated 'fresh' at build time. Since they hadn't been updated in years, predictably those auto-generated files were out-of-date with respect to later versions of autotools, and so caused a bunch of warnings when you built.

So just type make after the clone and let it call the right tools with the right options. Once that's executed, all the intermediate files will have been created, using the current versions of the build tools and scripts on your machine. Which includes replacing the stub makefile with the full one.

Personally, I'm not a big fan of autotools. For most people it's a black box, and the deeper you peek inside, the bigger a hack it seems to be.

@A9G-Data-Droid
Copy link

On Debian 11 Bullseye, when I make after clone I get:

checking whether to use libxml2... yes
./configure: line 11005: syntax error near unexpected token `libxml2,'
./configure: line 11005: `              PKG_CHECK_MODULES(libxml2, libxml-2.0,'

Checking my libxml2:

 $ sudo apt-get install libxml2-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2-dev is already the newest version (2.9.10+dfsg-6.7+deb11u4).

My pkg-config can see it:

pkg-config --list-all
form             form - ncurses 6.2 add-on library
formw            formw - ncurses 6.2 add-on library
fuse             fuse - Filesystem in Userspace
icu-i18n         icu-i18n - International Components for Unicode: Internationalization library
icu-io           icu-io - International Components for Unicode: Stream and I/O Library
icu-uc           icu-uc - International Components for Unicode: Common and Data libraries
iso-codes        iso-codes - ISO country, language, script and currency codes and translations
libcrypt         libxcrypt - Extended crypt library for DES, MD5, Blowfish and others
libcrypto        OpenSSL-libcrypto - OpenSSL cryptography library
libcurl          libcurl - Library to transfer files with ftp, http, etc.
libgdiplus       libgdiplus - GDI+ implementation
libnsl           libnsl - Library containing NIS functions using TI-RPC (IPv6 enabled)
libpcre2-16      libpcre2-16 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 16 bit character support
libpcre2-32      libpcre2-32 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 32 bit character support
libpcre2-8       libpcre2-8 - PCRE2 - Perl compatible regular expressions C library (2nd API) with 8 bit character support
libpcre2-posix   libpcre2-posix - Posix compatible interface to libpcre2-8
libselinux       libselinux - SELinux utility library
libsepol         libsepol - SELinux policy library
libssl           OpenSSL-libssl - Secure Sockets Layer and cryptography libraries
libtirpc         libtirpc - Transport Independent RPC Library
libxcrypt        libxcrypt - Extended crypt library for DES, MD5, Blowfish and others
libxml-2.0       libXML - libXML library version2.
menu             menu - ncurses 6.2 add-on library
menuw            menuw - ncurses 6.2 add-on library
ncurses          ncurses - ncurses 6.2 library
ncurses++        ncurses++ - ncurses 6.2 add-on library
ncurses++w       ncurses++w - ncurses 6.2 add-on library
ncursesw         ncursesw - ncurses 6.2 library
openssl          OpenSSL - Secure Sockets Layer and cryptography libraries and tools
panel            panel - ncurses 6.2 add-on library
panelw           panelw - ncurses 6.2 add-on library
shared-mime-info shared-mime-info - Freedesktop common MIME database
systemd          systemd - systemd System and Service Manager
tic              tic - ncurses 6.2 add-on library
tinfo            tinfo - ncurses 6.2 terminal interface library
udev             udev - udev
xkeyboard-config XKeyboardConfig - X Keyboard configuration data
zlib             zlib - zlib compression library

I tried manually setting the install locations:

./configure --with-libxml2-includes=/usr/include/libxml2 --with-libxml2-libraries=/usr/lib/x86_64-linux-gnu

Same error.

NOTE: If I go back to commit bfc68a4 then I can run configure and make just like it says in the old instructions. So that is the only version I can test on Debian 11.

@x86txt
Copy link

x86txt commented Jul 5, 2023

This should fix the libxml2 PKG error on Ubuntu and Debian. Run this while in the cloned repo root dir. The autoreconf -i -f seems to be what ultimately fixes it, so that would probably work on any other Linux seeing the same error.

apt install libtool autoconf && autoreconf -i -f && ./configure && make -j $(nproc)

@A9G-Data-Droid
Copy link

A9G-Data-Droid commented Jul 6, 2023

Thanks for the suggestion. autoreconf -i -f does something, but has no output. Then I get the same error as before.

I notice that the first thing the make command does is autoreconf --install which is the first command found in rebuild.mk. So I changed it to use your flags instead. Still no change. Same error.

./configure: line 11005: syntax error near unexpected token `libxml2,'
./configure: line 11005: `		PKG_CHECK_MODULES(libxml2, libxml-2.0,'
make: *** [rebuild.mk:6: rebuild] Error 2

EDIT: I should add that this is only happening on a headless Debian 11 install. When I run it from an Ubuntu desktop system it does the make. Maybe that's a clue?

@A9G-Data-Droid
Copy link

In order to get it to build in Ubuntu I had to modify the Makefile by adding -Wl,--no-as-needed -lcap to the CXXFLAGS:

CXXFLAGS = -g -O2 -Wl,--no-as-needed -lcap

The binary produced won't work on my Debian install when copied over so I do still need to get build working on my server.

@Uukrull
Copy link

Uukrull commented Aug 15, 2023

Same problem on Ubuntu Server 22 with the ./configure: line 11005: PKG_CHECK_MODULES(libxml2, libxml-2.0,' error.

After removing all

if test "$INCVAL" = "no" -o "$LIBVAL" = "no"; then
	PKG_CHECK_MODULES(..............)
fi

from the configure.ac I could compile it. It's a nasty hack but works.

@BradKollmyer
Copy link

For me this problem under Ubuntu went away after I install aptconf:
apt install pkgconf

@Uukrull
Copy link

Uukrull commented Aug 19, 2023

Indeed. It fixed the issue. Many thanks!

@paul-chambers paul-chambers transferred this issue from nzbget-ng/nzbget Jan 8, 2024
@paul-chambers paul-chambers removed their assignment Jan 11, 2024
@phnzb phnzb transferred this issue from another repository Jan 11, 2024
@luckedea
Copy link
Member

After combining nzbget-ng and nzbgetcom efforts - we are committed to support docker images ourselves. And of course we are modifying build instructions a lot too.

Please refer to Docker documentation https://github.com/nzbgetcom/nzbget/blob/develop/docker/README.md
Migration-related issue #84 (comment)

Feel free to submit new issues, ask questions, please provide feedback too. I'm going to close this issue.

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

No branches or pull requests

8 participants