Comments (5)
Can you try out the latest git development source, which fixes some pkg-config issues?
from asymptote.
Yes, I have tried. It doesn't work.
It seems that for the ncurses
check to succeed, -ltinfo
should already be in $LIBS
. But the tinfo
check done with CHECK_LIB_STATIC
autoconf macro, even successfull, doesn't append -ltinfo
to $LIBS
.
For example, replacing the line
CHECK_LIB_STATIC(tinfo,tinfo,tgetent,HAVE_LIBTINFO,AC_MSG_NOTICE([perhaps tgetent is in -lncurses]))
with
AC_CHECK_LIB(tinfo, tgetent)
on my system correctly prepends -ltinfo
to $LIBS
after the check and allows subsequent ncurses
check to succeed.
As for pkg-config, it seems to work fine on my system:
$ pkg-config --libs tinfo
-ltinfo
$ pkg-config --libs ncurses
-lncurses -ltinfo
However, the CHECK_LIB_STATIC
autoconf macro appends pkg-config output to $LDFLAGS
during the check, but not to $LIBS
. In linker arguments, $LDFLAGS
goes before the conftest.cpp
and $LIBS
goes after it. Because --as-needed
linker flag makes the order of linked libraries important, this results in a failed check.
from asymptote.
This is somewhat unfamiliar territory for me, but it seems that according to AC_CHECK_LIB
documentation, any extra libraries required for correct linkage, such as produced by pkg-config --libs
, should go in its fifth argument? Like this:
--- a/configure.ac
+++ b/configure.ac
@@ -344,7 +344,7 @@
[
LDFLAGS=$LDFLAGS_SAVE
$5
-])
+],$PKG_FLAGS)
]
else
[
@@ -352,7 +352,7 @@
$5
]
fi
-)]
+,$PKG_FLAGS)]
)
if test "x$enable_readline" != "xno"; then
from asymptote.
Yes, that seems like a good solution. I think it is better than the one I came up:
--- a/configure.ac
+++ b/configure.ac
@@ -333,14 +333,24 @@ PKG_FLAGS=-l"$2"
echo will try linking with $PKG_FLAGS
fi
LDFLAGS_SAVE=$LDFLAGS
-LDFLAGS="$LDFLAGS ""$STATIC ""$PKG_FLAGS ""$DYNAMIC "
-AC_CHECK_LIB($2,$3,AC_DEFINE($4,1,DEFINE_LIB($2)),
+LDFLAGS="$LDFLAGS "$STATIC"$PKG_FLAGS "$DYNAMIC
+AC_CHECK_LIB($2,$3,
+[
+LIBS=$LIBS$STATIC"$PKG_FLAGS "$DYNAMIC
+LDFLAGS=$LDFLAGS_SAVE
+AC_DEFINE($4,1,DEFINE_LIB($2))
+],
if test "x$enable_static" = "xyes"; then
[
echo "Static library not found; will check for dynamic version"
LDFLAGS="$LDFLAGS_SAVE ""$PKG_FLAGS "
AS_UNSET([ac_cv_lib_$2_$3])
-AC_CHECK_LIB($2,$3,AC_DEFINE($4,1,DEFINE_LIB($2)),
+AC_CHECK_LIB($2,$3,
+[
+LIBS=$LIBS"$PKG_FLAGS "
+LDFLAGS=$LDFLAGS_SAVE
+AC_DEFINE($4,1,DEFINE_LIB($2))
+],
[
LDFLAGS=$LDFLAGS_SAVE
$5
from asymptote.
Fixed in commit 99bd093.
from asymptote.
Related Issues (20)
- Documentation of cputime is in Structure section? HOT 1
- Feature suggestion: shorthand to create a picture HOT 9
- Feature suggestion: Remove `add(picture dest, picture src, pair position)` variant as it's dangerous HOT 4
- Stack traceback on error?
- Suggestion: integrate with Typst? HOT 3
- Suggestion: `envelope` type don't need `above` passed in HOT 1
- Why does the bounding box of a frame containing just a label not just the label's bounding box? HOT 1
- Suggestion: transformations for shading tools? HOT 1
- Feature suggestion: baseline specification for inclusion in LaTeX HOT 1
- Grammar railroad diagram HOT 2
- scale command breaks graph output HOT 2
- Most recent commit breaks my build HOT 5
- Rendering issues (Maybe only on Mac M1?) HOT 4
- remainder function in the math module HOT 26
- [xasy2asy] fix "SyntaxWarning" with python3.12+ HOT 1
- [xasy] migrate to python-pyqt6 HOT 9
- Array variable added with `var` does not trigger creation of array ops
- Missing labels in flattened 3D scene (using settings.render=0) after update to version 2.90. HOT 1
- Tree-sitter grammar HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asymptote.