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

Aarch64 GNU/Linux Build error: undefined reference to 'xmlXPathNodeSetAddUnique'... and more #23

Closed
ric96 opened this issue Mar 18, 2019 · 13 comments

Comments

@ric96
Copy link

ric96 commented Mar 18, 2019

gcc version 8.2-win32 20190215 (GCC)
Complete Build log:
https://pastebin.com/rif0iCxT

$ x86_64-w64-mingw32-gcc -v  
Using built-in specs.
COLLECT_GCC=x86_64-w64-mingw32-gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-w64-mingw32/8.2-win32/lto-wrapper
Target: x86_64-w64-mingw32
Configured with: ../../src/configure --build=aarch64-linux-gnu --prefix=/usr --includedir='/usr/include' --mandir='/usr/share/man' --infodir='/usr/share/info' --sysconfdir=/etc --localstatedir=/var --disable-silent-rules --libdir='/usr/lib/aarch64-linux-gnu' --libexecdir='/usr/lib/aarch64-linux-gnu' --disable-maintainer-mode --disable-dependency-tracking --prefix=/usr --enable-shared --enable-static --disable-multilib --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --libdir=/usr/lib --enable-libstdcxx-time=yes --with-tune=generic --with-headers=/usr/x86_64-w64-mingw32/include --enable-version-specific-runtime-libs --enable-fully-dynamic-string --enable-libgomp --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-lto --with-plugin-ld --enable-threads=win32 --program-suffix=-win32 --program-prefix=x86_64-w64-mingw32- --target=x86_64-w64-mingw32 --with-as=/usr/bin/x86_64-w64-mingw32-as --with-ld=/usr/bin/x86_64-w64-mingw32-ld --enable-libatomic
Thread model: win32
gcc version 8.2-win32 20190215 (GCC) 

@GrandBasis
Copy link

I have encountered this problem, you are just missing build dependencies, if you work on ubuntu, you need
sudo apt build-dep libxml2 libxslt libpng qemu wine
But in the end it is still the problem
#22

@ric96
Copy link
Author

ric96 commented Mar 20, 2019

sudo apt build-dep libxml2 libxslt libpng qemu wine
that didn't help

@stefand
Copy link
Collaborator

stefand commented Mar 22, 2019

The build deps should not be the issue in this case. Libxml and libxslt are compiled for the guest side (i.e., x86 and x86_64 windows) so that the guest side msxml.dll from Wine can link against it.

It seems that your libxslt does not find libxml. A few things to try:

*) Don't use a parallel make, i.e., run just "make" and not "make -j XX". Start with a clean hangover tree.
*) If that fails with the same error, build libxslt with V=1. Look for the libxslt dir in build/, cd into it and run "make V=1". It will give more details. Sorry, I don't have the exact name of the directory in my head.

@ric96
Copy link
Author

ric96 commented Mar 27, 2019

Errors with 'make V=1'
https://pastebin.com/Wdz1Qq0W

@savelov
Copy link

savelov commented Mar 29, 2019

my failed command was
/bin/bash ../libtool --silent --tag=CC --mode=link x86_64-w64-mingw32-gcc -I/home/eugene/hangover/build/x86_64-w64-mingw32/include/libxml2 -I/home/eugene/hangover/build/x86_64-w64-mingw32/include -g -O2 -Wall -Wformat=2 -Wmissing-format-attribute -version-info 8:20:8 -no-undefined -o libexslt.la -rpath /home/eugene/hangover/build/x86_64-w64-mingw32/lib exslt.lo common.lo crypto.lo math.lo sets.lo functions.lo strings.lo date.lo saxon.lo dynamic.lo ../libxslt/libxslt.la
I have added ../../libxml2_64/libxml2.la at the end to include libxml2 and apparently it fixed the build

@stefand
Copy link
Collaborator

stefand commented Mar 29, 2019

It is not trying to link to libxml2. Is libxml2 built correctly?

@stefand
Copy link
Collaborator

stefand commented Mar 29, 2019

Er, I did not read your last commend carefully enough. So libxml2 is there, although I think it should be built as a dynamic DLL, not a statically linked library. Something is certainly wrong - you shouldn't have to manually patch up build instructions...

@savelov
Copy link

savelov commented Mar 29, 2019

so for building 64-bit libexslt.la I had to manually add ../../libxml2_64/libxml2.la to the cmd line, and for 32-bit libexslt.la - ../../libxml2_32/libxml2.la
apparently root Makefile need to be amended to include those libraries for linking

@stefand
Copy link
Collaborator

stefand commented Mar 29, 2019

pkgconfig should figure this out. We invoke libxslt's configure with a PKG_CONFIG_PATH that points to the location where the Win32/Win64 build of libxml2.dll is placed.

Do you have pkgconfig installed on your system? If it is missing it might explain the symptom, although I would expect libxslt's configure to fail because it isn't able to find libxml2.

@savelov
Copy link

savelov commented Mar 29, 2019

did you mean pkg-config? it is present, but I assume this is for system libraries - but as I am on aarch64, local aarch64 libxml2 will not help, as I need x86_64 one to link

@GrandBasis
Copy link

As stefand said, the libxml2 static library was not found during the link phase, but it has been built correctly. You need to add the $(LIBXML_LIBS) parameter to the /hangover/libxslt64/libexslt/Makefile 144 line libexslt_la_LINK variable. This parameter is in the Makefile. Already defined but not used, I don't know why, after the generated libxslt32 also has the same problem

@GrandBasis
Copy link

I tried to add $(LIBXML_LIBS) in the hangover/libxslt/libexslt/Makefile.am 30 line variable libexslt_la_LIBADD, the libexslt.la dependency library is included, and the compilation is successful, I don't know if there is any impact on other locations.

@AndreRH
Copy link
Owner

AndreRH commented Mar 18, 2020

fixed by 51c0399

@AndreRH AndreRH closed this as completed Mar 18, 2020
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

No branches or pull requests

5 participants