Hi,
I just rebuilt gnustep-back on NetBSD 6.1.5 x86 and clang where it
builds, but then fails tu load/run with:
2018-02-18 17:48:19.355 Ink[22510:3099672676] NSApplication.m:317
Assertion failed in BOOL initialize_gnustep_backend(). Can't load
object file from backend at path
/System/Library/Bundles/libgnustep-back-026.bundle
Ink: Uncaught exception NSInternalInconsistencyException, reason:
NSApplication.m:317 Assertion failed in BOOL
initialize_gnustep_backend(). Can't load object file from backend at
path /System/Library/Bundles/libgnustep-back-026.bundle
The last time i checked this setup, it worked. It is a slightly older
NetBSd than I generally use but it uses clang instead of gcc
Relevant sections in the configure log seem also fine to me, pkgconfig
gets detected and the config output is below.
Cairo is detected, not freetype, so it gets switched to xlib, but still
I guess it should work
checking for XcursorImageCreate in -lXcursor... yes
Xcursor is explicitely found!
An issue might be:
configure:3954: checking whether -R must be followed by a space
configure:3970: clang -o conftest -g -O2 -I/System/Library/Headers
-I/usr/pkg/include -L/System/Library/Libraries/gnu-gnu-gnu
-L/System/Library/Libraries -Wl,-R/usr/pkg/lib -L/usr/pkg/lib
conftest.c -R/usr/X11R7/lib >&5
clang: warning: argument unused during compilation: '-R/usr/X11R7/lib'
what would be this -R/usr/X11R7/lib ? Shouldn't it always be
-Wl,-R/usr/X11R7/lib ??
The xlib backend should build just fine.
I got around the linking issue by adding LDFLAGS="-Wl,-R/usr/X11R7/lib
-L/usr/X11R7/lib" however then no Fonts gets displayed! It may be the
same issue that Cairo has: wrong library.
Further question is: why doesn't the cairo backend work out? This is the
failing test:
configure:5300: checking ft2build.h usability
configure:5300: clang -c -g -O2 -I/usr/X11R7/include
-I/System/Library/Headers
-I/usr/pkg/include -I/usr/pkg/include/freetype2 conftest.c >&5
In file included from conftest.c:62:
/usr/X11R7/include/ft2build.h:34:10: fatal error:
'freetype/config/ftheader.h' f
ile not found
#include <freetype/config/ftheader.h>
I have both a freetype package as a system freetype I guess the "order"
is frong, since the system path is before pkg, it gets detected.
pkg-config is returning the flags for the pkg one and not the system
one, but then the tests finds the system one and fails. I think
somewhere we append these flags instead of prepending them!
I found this in our configure.ac
GRAPHIC_CFLAGS="$X_CFLAGS $GRAPHIC_CFLAGS"
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
# Note: Don't include $X_LIBS in LDFLAGS as it may conflict with
# other libraries installed in /sw, /sw/lib/freetyp2/lib
#GRAPHIC_LFLAGS="$X_LIBS $GRAPHIC_LFLAGS"
# But do include it here just to find the extra x libraries
LDFLAGS="$X_LIBS $LDFLAGS"
LIBS="-lX11 $X_EXTRA_LIBS $LIBS"
First, note that there is a comment... and then we exactly to what the
comment says not to do! Since freetype is excactly the library I am
having an issue with....
Both LDFLAGS and CPPFLAGS are appended and not prepended, I did change that.
Then I think also this needs to be fixed:
CPPFLAGS="${FREETYPE_CFLAGS} ${CPPFLAGS}"
This finally worked for cairo (did not recheck if xlib works though). I
acclude the configure patch. I did not commit it yet and am open for
discussion, might this cause unforseen other issues?
What do you guys thik?
And the note about X_LIBS that somebody added?
Riccardo
narsil: {9} ./configure
checking build system type... i386-unknown-netbsdelf6.1
checking host system type... i386-unknown-netbsdelf6.1
checking target system type... i386-unknown-netbsdelf6.1
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking how to run the C preprocessor... clang -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking for syslog... yes
checking for X... libraries /usr/X11R7/lib, headers /usr/X11R7/include
checking whether -R must be followed by a space... neither works
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking for pkg-config... /usr/pkg/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for main in -lXext... yes
checking for main in -lXt... yes
checking for main in -lXmu... yes
checking for XFixesSelectSelectionInput in -lXfixes... yes
checking for XcursorImageCreate in -lXcursor... yes
checking for X11/extensions/shape.h... yes
checking for XShapeCombineMask in -lXext... yes
checking for X11/extensions/sync.h... yes
checking for X11 function prototypes... yes
checking DPS/dpsclient.h usability... no
checking DPS/dpsclient.h presence... no
checking for DPS/dpsclient.h... no
checking DPS/dpsNXargs.h usability... no
checking DPS/dpsNXargs.h presence... no
checking for DPS/dpsNXargs.h... no
checking for freetype2... yes
checking ft2build.h usability... no
checking ft2build.h presence... no
checking for ft2build.h... no
checking for xft... yes
checking for XftDrawStringUtf8 in -lXft... yes
checking for XftPatternGetString in -lXft... no
checking for Xutf8LookupString... yes
checking for FcPatternCreate in -lfontconfig... yes
checking fontconfig/fontconfig.h usability... yes
checking fontconfig/fontconfig.h presence... yes
checking for fontconfig/fontconfig.h... yes
checking for glXMakeContextCurrent in -lGL... yes
checking GL/glx.h usability... yes
checking GL/glx.h presence... yes
checking for GL/glx.h... yes
checking for GLX_RGBA_TYPE... yes
checking for usleep... yes
checking for X11/extensions/XShm.h... yes
checking for shmctl... yes
checking for XInternAtoms in -lX11... yes
checking for main in -lgdi32... no
checking for main in -lmsimg32... no
checking for main in -limm32... no
checking for main in -lopengl32... no
checking windows.h usability... no
checking windows.h presence... no
checking for windows.h... no
checking for libart2... none
checking for main in -lart_lgpl_2... no
checking for cairo... yes
checking for cairo-ft... yes
checking for cairo-xlib... yes
checking for cairo-win32... no
checking for cairo-glitz... no
checking for fontconfig... yes
checking for cairo_win32_surface_create in -lcairo... no
checking for XRenderFindVisualFormat in -lXrender... yes
checking Backend Server... x11
checking Backend Graphics... cairo
configure: WARNING: can't find freetype, required for graphics=cairo
configure: Switching to xlib
checking whether the compiler supports -Wdeclaration-after-statement... yes
checking Backend name... back
configure: creating ./config.status
config.status: creating back.make
config.status: creating config.make
config.status: creating config.h
config.status: config.h is unchanged
diff --git a/configure.ac b/configure.ac
index 38dd6f4..fa1626e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,10 +129,10 @@ LDFLAGS="$LDFLAGS -L$GNUSTEP_LDIR/$LIBRARY_COMBO
-L$GNUSTEP_LDIR"
#--------------------------------------------------------------------
case "$target_os" in
freebsd* | openbsd* )
- CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
- LDFLAGS="$LDFLAGS -L/usr/pkg/lib";;
- netbsd*) CPPFLAGS="$CPPFLAGS -I/usr/pkg/include"
- LDFLAGS="$LDFLAGS -Wl,-R/usr/pkg/lib -L/usr/pkg/lib";;
+ CPPFLAGS="-I/usr/pkg/include $CPPFLAGS"
+ LDFLAGS="-L/usr/pkg/lib $LDFLAGS";;
+ netbsd*) CPPFLAGS="-I/usr/pkg/include $CPPFLAGS"
+ LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib $LDFLAGS";;
esac
#--------------------------------------------------------------------
@@ -166,12 +166,12 @@ PKG_PROG_PKG_CONFIG
if test $set_x_paths = yes; then
GRAPHIC_CFLAGS="$X_CFLAGS $GRAPHIC_CFLAGS"
- CPPFLAGS="$X_CFLAGS $CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $X_CFLAGS"
# Note: Don't include $X_LIBS in LDFLAGS as it may conflict with
# other libraries installed in /sw, /sw/lib/freetyp2/lib
#GRAPHIC_LFLAGS="$X_LIBS $GRAPHIC_LFLAGS"
# But do include it here just to find the extra x libraries
- LDFLAGS="$X_LIBS $LDFLAGS"
+ LDFLAGS="$LDFLAGS $X_LIBS"
LIBS="-lX11 $X_EXTRA_LIBS $LIBS"
AC_CHECK_LIB(Xext, main)
@@ -264,7 +264,7 @@ if test $with_freetype = yes; then
if test x"$FREETYPE_LIBS" != x; then
save_CPPFLAGS=${CPPFLAGS}
- CPPFLAGS="${CPPFLAGS} ${FREETYPE_CFLAGS}"
+ CPPFLAGS="${FREETYPE_CFLAGS} ${CPPFLAGS}"
AC_CHECK_HEADER(ft2build.h,have_freetype=yes, have_freetype=no)
CPPFLAGS="${save_CPPFLAGS}"
fi
_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev