Opened 3 months ago
Closed 7 hours ago
#70504 closed defect (fixed)
links @2.30+x11: configure: error: No graphics drivers found.
Reported by: | ballapete (Peter "Pete" Dyballa) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.9.3 |
Keywords: | Cc: | dgonyier (Dwaine Gonyier), aeiouaeiouaeiouaeiouaeiouaeiou | |
Port: | links |
Description
checking for avifDecoderSetIOMemory in -lavif... yes configure: error: No graphics drivers found. Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_links/links/work/links-2.30" && ./configure --prefix=/opt/local --enable-graphics --disable-javascript --mandir=/opt/local/share/man --with-ssl --with-libjpeg --with-libpng --with-librsvg --with-libtiff --without-openmp --with-x Exit code: 1 Error: Failed to configure links: consult /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_links/links/work/links-2.30/config.log Error: Failed to configure links: configure failure: command execution failed Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_www_links/links/main.log for details.
Attachments (2)
Change History (8)
Changed 3 months ago by ballapete (Peter "Pete" Dyballa)
Changed 3 months ago by ballapete (Peter "Pete" Dyballa)
Attachment: | config.log added |
---|
Config.log from macOS Sonoma 14.5
comment:1 follow-up: 3 Changed 3 months ago by ballapete (Peter "Pete" Dyballa)
Invoking configure
with sh -x
gives:
+ echo avif_avifDecoderSetIOMemory ++ sed y%./+-%__p_% + ac_lib_var=avif_avifDecoderSetIOMemory ++ echo '${ac_cv_lib_avif_avifDecoderSetIOMemory+set}' + eval 'test "${ac_cv_lib_avif_avifDecoderSetIOMemory+set}" = set' ++ test '' = set + ac_save_LIBS='-L/opt/local/lib -lwebp -L/opt/local/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -ltiff -ljpeg -L/opt/local/lib -lpng16 -L/opt/local/lib -lfontconfig -lfreetype -llzma -lbz2 -lz -L/opt/local/libexec/openssl3/lib -lssl -lcrypto -lm ' + LIBS='-lavif -L/opt/local/lib -lwebp -L/opt/local/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -ltiff -ljpeg -L/opt/local/lib -lpng16 -L/opt/local/lib -lfontconfig -lfreetype -llzma -lbz2 -lz -L/opt/local/libexec/openssl3/lib -lssl -lcrypto -lm ' + cat + eval echo configure:12255: '"${CC-cc}' -o 'conftest${ac_exeext}' '$CFLAGS' '$CPPFLAGS' '$LDFLAGS' 'conftest.$ac_ext' '$LIBS' '1>&5"' ++ echo configure:12255: 'gcc -o conftest -g -O2 -I/opt/local/libexec/openssl3/include -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include -I/opt/local/include/cairo -I/opt/local/include -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include -I/opt/local/include/pixman-1 -I/opt/local/include -I/opt/local/include/freetype2 -I/opt/local/include -I/opt/local/include/libpng16 -I/opt/local/include -I/opt/local/include -I/opt/local/include/webp conftest.c -lavif -L/opt/local/lib -lwebp -L/opt/local/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -ltiff -ljpeg -L/opt/local/lib -lpng16 -L/opt/local/lib -lfontconfig -lfreetype -llzma -lbz2 -lz -L/opt/local/libexec/openssl3/lib -lssl -lcrypto -lm 1>&5' + test -s conftest + rm -rf conftest conftest.c conftest.dSYM + eval ac_cv_lib_avif_avifDecoderSetIOMemory=yes ++ ac_cv_lib_avif_avifDecoderSetIOMemory=yes + rm -f 'conftest*' + LIBS='-L/opt/local/lib -lwebp -L/opt/local/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -ltiff -ljpeg -L/opt/local/lib -lpng16 -L/opt/local/lib -lfontconfig -lfreetype -llzma -lbz2 -lz -L/opt/local/libexec/openssl3/lib -lssl -lcrypto -lm ' ++ echo '$ac_cv_lib_avif_avifDecoderSetIOMemory' + eval 'test "$ac_cv_lib_avif_avifDecoderSetIOMemory" = yes' ++ test yes = yes + echo yes yes ++ echo avif ++ sed -e 's/[^a-zA-Z0-9_]/_/g' -e y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/ + ac_tr_lib=HAVE_LIBAVIF + cat + LIBS='-lavif -L/opt/local/lib -lwebp -L/opt/local/lib -lrsvg-2 -lm -lgio-2.0 -lgdk_pixbuf-2.0 -lgobject-2.0 -lglib-2.0 -lintl -lcairo -ltiff -ljpeg -L/opt/local/lib -lpng16 -L/opt/local/lib -lfontconfig -lfreetype -llzma -lbz2 -lz -L/opt/local/libexec/openssl3/lib -lssl -lcrypto -lm ' + test yes = yes + test yes = yes + cat + cf_have_avif=yes + image_formats='GIF PNG XBM JPEG TIFF SVG WEBP AVIF' + test -z '' + test yes '!=' no + echo 'configure: error: No graphics drivers found.' configure: error: No graphics drivers found. + exit 1
The test seems to be successful, but: No graphics drivers found.
Concerning the graphics libraries I seem to have all. The problem is in these lines:
12306 if test -z "$drivers" && test "$cf_use_graphics" != no; then 12307 { echo "configure: error: No graphics drivers found." 1>&2; exit 1; } 12308 fi
$drivers
is empty. Shouldn't it be at least X
?
8410: drivers="" 8552: drivers="$drivers SVGALIB" 8604: drivers="$drivers FB" 8794: drivers="$drivers DIRECTFB" 9478: drivers="$drivers X" 9525: drivers="$drivers PMSHELL" 9699: drivers="$drivers WINDOWS" 10036: drivers="$drivers ATHEOS" 10327: drivers="$drivers HAIKU" 10428: drivers="$drivers GRX" 12306: if test -z "$drivers" && test "$cf_use_graphics" != no; then 12307: { echo "configure: error: No graphics drivers found." 1>&2; exit 1; }
comment:3 Changed 13 hours ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sonoma intel removed |
---|---|
Summary: | links @2.30 does not build on macOS Sonoma 14.5 because of configure: error: No graphics drivers found. → links @2.30+x11: configure: error: No graphics drivers found. |
As far as I can tell the problem only happens when using the +x11 variant and is not specific to OS version or architecture.
Replying to ballapete:
$drivers
is empty. Shouldn't it be at leastX
?
No, because main.log says X could not be found:
:info:configure checking for X... no
config.log says the reason is:
configure:8947:14: error: expected parameter declarator int XtMalloc(0) ^ configure:8947:14: error: expected ')' configure:8947:13: note: to match this '(' int XtMalloc(0) ^ configure:8947:5: warning: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration [-Wdeprecated-non-prototype] int XtMalloc(0) ^ /opt/local/include/X11/Intrinsic.h:1853:14: note: conflicting prototype is here extern char *XtMalloc( ^ configure:8947:5: error: conflicting types for 'XtMalloc' int XtMalloc(0) ^ /opt/local/include/X11/Intrinsic.h:1853:14: note: previous declaration is here extern char *XtMalloc( ^ 1 warning and 3 errors generated. configure: failed program was: #line 8943 "configure" #include "confdefs.h" #include <X11/Intrinsic.h> int main() { int XtMalloc(0) ; return 0; }
comment:4 Changed 12 hours ago by ryandesign (Ryan Carsten Schmidt)
Cc: | dgonyier aeiouaeiouaeiouaeiouaeiouaeiou added |
---|
This is happening due to a combination of a strange configure script and a patch that we are adding in the port. The patch was correct when I added it to fix #62432, but links was updated many times since then. Most recently, during the 2.30 update, most of the patch was removed presumably because it was no longer needed but the section that previously fixed the detection of X was kept.
In the unpatched 2.29 configure script it says:
test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
and the test uses this function:
int main() { ${x_direct_test_function}() ; return 0; }
which expands to:
int main() { XtMalloc() ; return 0; }
Per the old ticket, this had failed due to:
configure:8935:1: error: implicit declaration of function 'XtMalloc' is invalid in C99 [-Werror,-Wimplicit-function-declaration] XtMalloc() ^ 1 error generated.
I had tried to fix it by adding:
#include <X11/Intrinsic.h>
But this had failed with:
configure:8946:10: error: too few arguments to function call, expected 1, have 0 XtMalloc() ~~~~~~~~ ^ /opt/local/include/X11/Intrinsic.h:1853:14: note: 'XtMalloc' declared here extern char *XtMalloc( ^ 1 error generated.
Therefore I further changed:
${x_direct_test_function}()
to:
${x_direct_test_function}(0)
and that's what's still in the patch today.
links is weird in that I believe its developer generates the configure script by running the rebuild
script which post-processes the configure script in various ways, including, as of 2.30, this sed
expression:
s/XtMalloc/'int XtMalloc'/
As a result, the configure script in 2.30 now reads:
test -z "$x_direct_test_function" && x_direct_test_function='int XtMalloc'
and the test function:
int main() { ${x_direct_test_function}() ; return 0; }
now expands to:
int main() { int XtMalloc() ; return 0; }
which looks like nonsense to me. The compiler allows it but it certainly doesn't do anything to verify whether or not XtMalloc
exists. The previous code in 2.29 and earlier tried to call XtMalloc
, thereby verifying it exists. The new 2.30 code declares a local XtMalloc
function inside the main
function which it never calls. If we remove our patch, configure "finds" X, though I'm pretty sure it would "find" X even if it weren't there.
With our patch in place, the function being tested becomes:
int main() { int XtMalloc(0) ; return 0; }
which is not only nonsense but also a syntax error which is why configure currently fails.
The developer of links needs to be notified to fix the configure test properly and to remove their weird sed
replacement of XtMalloc
by 'int XtMalloc'
.
comment:5 Changed 7 hours ago by ryandesign (Ryan Carsten Schmidt)
These problems happen because the links configure script was generated with autoconf 2.13 which was released in January 1999. These bugs were fixed in autoconf in June 2000: this commit added the required parameter when calling XtMalloc
and this commit added the required #include <X11/Intrinsic.h>
. The developer of links needs to regenerate the configure script with a newer version of autoconf, which will probably require rewrites to the configure.in file since so much has changed in autoconf in the past quarter century.
comment:6 Changed 7 hours ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Main.log from macOS Sonoma, 14.5