[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master ffe2274: Installation: LDADD found at configur
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master ffe2274: Installation: LDADD found at configure time always used |
Date: |
Sun, 31 Jan 2021 15:46:55 -0500 (EST) |
branch: master
commit ffe22747f661bd683270249669216eeb222c0ccb
Author: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Commit: Mohammad Akhlaghi <mohammad@akhlaghi.org>
Installation: LDADD found at configure time always used
Until now, the 'CONFIG_LDADD' linker options that are gathered during the
'./configure' step were only added when RPATH was not enabled at
configuration time. The basic idea was that when RPATH was enabled, the
Gnuastro library already linked with the dependency libraries, so there was
no need. However, when Gnuastro was bootstrapped on some GNU/Linux systems
the RPATH test didn't operate as expected and would cause a linking
problem.
With this commit, we directly use the 'CONFIG_LDADD' variable
unconditionally in the 'Makefile.am' of all the programs. After a test on
my own system, the final build command that was printed on the terminal was
identical between the two and made no difference. It also fixed the problem
on the computer of Francois (who initially reported this problem)
This bug was fixed with the help of Francois Ochsenbein and was previously
also reported by Sachin Kumar Singh.
---
bin/TEMPLATE/Makefile.am | 7 ++-----
bin/arithmetic/Makefile.am | 6 +-----
bin/buildprog/Makefile.am | 7 ++-----
bin/convertt/Makefile.am | 7 ++-----
bin/convolve/Makefile.am | 7 ++-----
bin/cosmiccal/Makefile.am | 7 ++-----
bin/crop/Makefile.am | 7 ++-----
bin/fits/Makefile.am | 7 ++-----
bin/match/Makefile.am | 7 ++-----
bin/mkcatalog/Makefile.am | 7 ++-----
bin/mknoise/Makefile.am | 8 ++------
bin/mkprof/Makefile.am | 7 ++-----
bin/noisechisel/Makefile.am | 5 +----
bin/query/Makefile.am | 13 +++----------
bin/segment/Makefile.am | 7 ++-----
bin/statistics/Makefile.am | 5 +----
bin/table/Makefile.am | 7 ++-----
bin/warp/Makefile.am | 7 ++-----
configure.ac | 1 -
doc/announce-acknowledge.txt | 1 +
20 files changed, 35 insertions(+), 95 deletions(-)
diff --git a/bin/TEMPLATE/Makefile.am b/bin/TEMPLATE/Makefile.am
index a34322a..dec0ad8 100644
--- a/bin/TEMPLATE/Makefile.am
+++ b/bin/TEMPLATE/Makefile.am
@@ -25,9 +25,6 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
@@ -38,8 +35,8 @@ bin_PROGRAMS = astTEMPLATE
## don't keep external variables (needed in Argp) after the first link. So
## the 'libgnu' (that is indirectly linked through 'libgnuastro') can't see
## those variables. We thus need to explicitly link with 'libgnu' first.
-astTEMPLATE_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astTEMPLATE_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astTEMPLATE_SOURCES = main.c ui.c TEMPLATE.c
diff --git a/bin/arithmetic/Makefile.am b/bin/arithmetic/Makefile.am
index d144b81..c73400c 100644
--- a/bin/arithmetic/Makefile.am
+++ b/bin/arithmetic/Makefile.am
@@ -25,10 +25,6 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
-
## Program definition (name, linking, sources and headers)
@@ -36,7 +32,7 @@ bin_PROGRAMS = astarithmetic
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
astarithmetic_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
- -lgnuastro $(MAYBE_NORPATH)
+ -lgnuastro $(CONFIG_LDADD)
astarithmetic_SOURCES = main.c ui.c arithmetic.c operands.c
diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index 1ac6c1f..cd29e8d 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -32,17 +32,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-DINCLUDEDIR=\"$(includedir)\" \
-DEXEEXT=\"$(EXEEXT)\"
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astbuildprog
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astbuildprog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astbuildprog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
# Basic program sources.
astbuildprog_SOURCES = main.c ui.c buildprog.c
diff --git a/bin/convertt/Makefile.am b/bin/convertt/Makefile.am
index af56636..33f2b3c 100644
--- a/bin/convertt/Makefile.am
+++ b/bin/convertt/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astconvertt
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astconvertt_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astconvertt_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astconvertt_SOURCES = main.c ui.c convertt.c color.c
diff --git a/bin/convolve/Makefile.am b/bin/convolve/Makefile.am
index 22723c4..1721343 100644
--- a/bin/convolve/Makefile.am
+++ b/bin/convolve/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astconvolve
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astconvolve_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astconvolve_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astconvolve_SOURCES = main.c ui.c convolve.c
diff --git a/bin/cosmiccal/Makefile.am b/bin/cosmiccal/Makefile.am
index 039f593..9ad628c 100644
--- a/bin/cosmiccal/Makefile.am
+++ b/bin/cosmiccal/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astcosmiccal
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astcosmiccal_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astcosmiccal_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astcosmiccal_SOURCES = main.c ui.c cosmiccal.c
diff --git a/bin/crop/Makefile.am b/bin/crop/Makefile.am
index 59da058..c4a5450 100644
--- a/bin/crop/Makefile.am
+++ b/bin/crop/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astcrop
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astcrop_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astcrop_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astcrop_SOURCES = main.c ui.c crop.c wcsmode.c onecrop.c
diff --git a/bin/fits/Makefile.am b/bin/fits/Makefile.am
index e24f1ed..869cbc1 100644
--- a/bin/fits/Makefile.am
+++ b/bin/fits/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astfits
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astfits_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astfits_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astfits_SOURCES = main.c ui.c extension.c fits.c keywords.c
diff --git a/bin/match/Makefile.am b/bin/match/Makefile.am
index 543eaf0..75f3413 100644
--- a/bin/match/Makefile.am
+++ b/bin/match/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmatch
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astmatch_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astmatch_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astmatch_SOURCES = main.c ui.c match.c
diff --git a/bin/mkcatalog/Makefile.am b/bin/mkcatalog/Makefile.am
index 04ff370..be06118 100644
--- a/bin/mkcatalog/Makefile.am
+++ b/bin/mkcatalog/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmkcatalog
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astmkcatalog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astmkcatalog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astmkcatalog_SOURCES = main.c ui.c mkcatalog.c columns.c upperlimit.c parse.c
diff --git a/bin/mknoise/Makefile.am b/bin/mknoise/Makefile.am
index 0bf9ed1..1b22a4c 100644
--- a/bin/mknoise/Makefile.am
+++ b/bin/mknoise/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmknoise
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astmknoise_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astmknoise_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astmknoise_SOURCES = main.c ui.c mknoise.c
@@ -43,7 +40,6 @@ EXTRA_DIST = main.h authors-cite.h args.h ui.h mknoise.h
-
## The configuration file (distribute and install).
## NOTE: the man page is created in doc/Makefile.am
dist_sysconf_DATA = astmknoise.conf
diff --git a/bin/mkprof/Makefile.am b/bin/mkprof/Makefile.am
index 6f72c86..ca0a5c8 100644
--- a/bin/mkprof/Makefile.am
+++ b/bin/mkprof/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmkprof
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astmkprof_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astmkprof_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astmkprof_SOURCES = main.c ui.c mkprof.c oneprofile.c profiles.c
diff --git a/bin/noisechisel/Makefile.am b/bin/noisechisel/Makefile.am
index e6c508d..8d6a33f 100644
--- a/bin/noisechisel/Makefile.am
+++ b/bin/noisechisel/Makefile.am
@@ -25,9 +25,6 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
@@ -35,7 +32,7 @@ bin_PROGRAMS = astnoisechisel
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
astnoisechisel_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
- -lgnuastro $(MAYBE_NORPATH)
+ -lgnuastro $(CONFIG_LDADD)
astnoisechisel_SOURCES = main.c ui.c detection.c noisechisel.c sky.c \
threshold.c
diff --git a/bin/query/Makefile.am b/bin/query/Makefile.am
index 39cbe24..a3f9a16 100644
--- a/bin/query/Makefile.am
+++ b/bin/query/Makefile.am
@@ -25,21 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astquery
-## We are linking with 'libgnu' first eventhough 'libgnu' is already linked
-## to 'libgnuastro'. The reason is that some linkers (Mac OS for example),
-## don't keep external variables (needed in Argp) after the first link. So
-## the 'libgnu' (that is indirectly linked through 'libgnuastro') can't see
-## those variables. We thus need to explicitly link with 'libgnu' first.
-astquery_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
+astquery_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astquery_SOURCES = main.c ui.c query.c astron.c gaia.c ned.c tap.c \
vizier.c
diff --git a/bin/segment/Makefile.am b/bin/segment/Makefile.am
index 642f84d..14d5878 100644
--- a/bin/segment/Makefile.am
+++ b/bin/segment/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astsegment
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astsegment_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astsegment_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astsegment_SOURCES = main.c ui.c segment.c clumps.c
diff --git a/bin/statistics/Makefile.am b/bin/statistics/Makefile.am
index 428960a..5c1130a 100644
--- a/bin/statistics/Makefile.am
+++ b/bin/statistics/Makefile.am
@@ -25,9 +25,6 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
@@ -35,7 +32,7 @@ bin_PROGRAMS = aststatistics
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
aststatistics_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
- -lgnuastro $(MAYBE_NORPATH)
+ -lgnuastro $(CONFIG_LDADD)
aststatistics_SOURCES = main.c ui.c contour.c sky.c statistics.c
diff --git a/bin/table/Makefile.am b/bin/table/Makefile.am
index aabaaa6..9f382ae 100644
--- a/bin/table/Makefile.am
+++ b/bin/table/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = asttable
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-asttable_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+asttable_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
asttable_SOURCES = main.c ui.c arithmetic.c table.c
diff --git a/bin/warp/Makefile.am b/bin/warp/Makefile.am
index 764ef4a..850600b 100644
--- a/bin/warp/Makefile.am
+++ b/bin/warp/Makefile.am
@@ -25,17 +25,14 @@ AM_CPPFLAGS = -I\$(top_builddir)/bootstrapped/lib \
-I\$(top_srcdir)/bootstrapped/lib \
-I\$(top_srcdir)/lib
-if COND_NORPATH
- MAYBE_NORPATH = $(CONFIG_LDADD)
-endif
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astwarp
## Reason for linking with 'libgnu' described in 'bin/TEMPLATE/Makefile.am'.
-astwarp_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro \
- $(MAYBE_NORPATH)
+astwarp_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la \
+ -lgnuastro $(CONFIG_LDADD)
astwarp_SOURCES = main.c ui.c warp.c
diff --git a/configure.ac b/configure.ac
index 1cc4d68..0ed3b9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -923,7 +923,6 @@ AM_CONDITIONAL([COND_WARP], [test $enable_warp =
yes])
# linking flags and put them in the Makefiles.
LIBS="$orig_LIBS"
AC_SUBST(CONFIG_LDADD, [$LDADD])
-AM_CONDITIONAL([COND_NORPATH], [test "x$enable_rpath" = "xno"])
AS_ECHO(["linking flags (LDADD) ... $LDADD"])
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 6aa0aca..bc54b61 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -1,6 +1,7 @@
Alphabetically ordered list to acknowledge in the next release.
Mark Calabretta
+Francois Ochsenbein
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnuastro-commits] master ffe2274: Installation: LDADD found at configure time always used,
Mohammad Akhlaghi <=