pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/libreoffice on i386



Hello

Building latest misc/libreoffice on NetBSD-9.3/i386 fail (well, to be 
precise, I cross-build it on amd64 using pkg_comp1) because of
undefined reference to '__stack_chk_fail' in configure tests.

configure stops on atomic tests because the test fails on that missing
symbol, but previous tests failed on that as wekk
on atomic operations tests.

I worked it around in pkgsrc/misc/libreoffice/Makfile with
CFLAGS.NetBSD+=          -fno-stack-protector

Additionaly, it fails again during the build for the same reason:

checking thread safety of required library functions... no
configure: error: thread test program failed
This platform is not thread-safe.  Check the file 'config.log' or compile
and run src/test/thread/thread_test for the exact reason.
Use --disable-thread-safety to disable thread safety.
gmake[1]: *** [/pkg_comp/obj/pkgsrc/misc/libreoffice/default/libreoffice-24.2.2.2/external/postgresql/ExternalProject_postgresql.mk:65: /pkg_comp/obj/pkgsrc/misc/libreoffice/default/libreoffice-24.2.2.2/workdir/ExternalProject/postgresql/build] Error 1

I had to patch:

--- external/postgresql/ExternalProject_postgresql.mk.orig      2024-05-11 06:42:51.776284220 +0200
+++ external/postgresql/ExternalProject_postgresql.mk   2024-05-11 06:43:17.080083653 +0200
@@ -70,9 +70,9 @@
                        $(gb_CONFIGURE_PLATFORMS) \
                        $(if $(ENABLE_OPENSSL),--with-openssl \
                                $(if $(WITH_GSSAPI),--with-gssapi)) \
                                $(if $(ENABLE_LDAP),,--with-ldap=no) \
-                       CFLAGS="-fPIC" \
+                       CFLAGS="-fPIC  -fno-stack-protector" \
                        CPPFLAGS="$(postgresql_CPPFLAGS)" \
                        LDFLAGS="$(postgresql_LDFLAGS)" \
                        $(if $(ENABLE_LDAP),EXTRA_LDAP_LIBS="-llber") \
                && cd src/interfaces/libpq \

Of course this is just a useful hack that needs improvement.

I understand we cannot link code with and witout stack protector. I 
suspect it would be a better fix to add -fstack-protector where it
has been missing but I am not sure how to track the missing bit. 
Hints welcome.

There is also a long standing build caveat for libreoffice: if 
libnet is installed, at some point in the build we get a link
failure against libnio because there are two different libnio, 
one from openjdk and one from libnet. I am not sure how we could
make sure the right one is used.

-- 
Emmanuel Dreyfus
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index