[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnuastro-commits] master 5e12782 3/3: Programs link directly with Gnuli
From: |
Mohammad Akhlaghi |
Subject: |
[gnuastro-commits] master 5e12782 3/3: Programs link directly with Gnulib |
Date: |
Thu, 24 May 2018 14:39:11 -0400 (EDT) |
branch: master
commit 5e12782d371a43218d9854de48d7bf8fe87b4dd5
Author: Mohammad Akhlaghi <address@hidden>
Commit: Mohammad Akhlaghi <address@hidden>
Programs link directly with Gnulib
Until now only Gnuastro's library would link with Gnulib. All the programs
would then access Gnulib through Gnuastro's library. This was fine on
GNU/Linux linkers. But as reported over one year ago by Alan Lefor (in bug
Mac OS systems (just found out now, thanks to Leindert Boogaard).
With this commit, each program will first link with Gnulib, then with
Gnuastro's library and initial tests with Leindert showed that it solved
the problem.
This bug was found and solved thanks to Alan Lefor and Leindert Boogaard.
This fixes bug #50957.
---
NEWS | 1 +
bin/TEMPLATE/Makefile.am | 7 ++++++-
bin/arithmetic/Makefile.am | 3 ++-
bin/buildprog/Makefile.am | 3 ++-
bin/convertt/Makefile.am | 3 ++-
bin/convolve/Makefile.am | 3 ++-
bin/cosmiccal/Makefile.am | 3 ++-
bin/crop/Makefile.am | 3 ++-
bin/fits/Makefile.am | 3 ++-
bin/match/Makefile.am | 3 ++-
bin/mkcatalog/Makefile.am | 3 ++-
bin/mknoise/Makefile.am | 3 ++-
bin/mkprof/Makefile.am | 3 ++-
bin/noisechisel/Makefile.am | 3 ++-
bin/segment/Makefile.am | 3 ++-
bin/statistics/Makefile.am | 3 ++-
bin/table/Makefile.am | 3 ++-
bin/warp/Makefile.am | 3 ++-
doc/announce-acknowledge.txt | 1 +
19 files changed, 40 insertions(+), 17 deletions(-)
diff --git a/NEWS b/NEWS
index 4dc4f6c..1f2ca39 100644
--- a/NEWS
+++ b/NEWS
@@ -195,6 +195,7 @@ GNU Astronomy Utilities NEWS -*-
outline -*-
** Bug fixes
+ bug #50957: --version output not possible on Mac OS X
bug #52979: Many unused result warnings for asprintf in some compilers.
bug #53122: Configure time CPPFLAGS and LDFLAGS don't pass to BuildProgram.
bug #53142: Crash when printing values with the `--onlyversion' option.
diff --git a/bin/TEMPLATE/Makefile.am b/bin/TEMPLATE/Makefile.am
index b4888ba..c790ed0 100644
--- a/bin/TEMPLATE/Makefile.am
+++ b/bin/TEMPLATE/Makefile.am
@@ -28,7 +28,12 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astTEMPLATE
-astTEMPLATE_LDADD = -lgnuastro
+## 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.
+astTEMPLATE_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astTEMPLATE_SOURCES = main.c ui.c TEMPLATE.c
diff --git a/bin/arithmetic/Makefile.am b/bin/arithmetic/Makefile.am
index 865faa0..6dbc3e6 100644
--- a/bin/arithmetic/Makefile.am
+++ b/bin/arithmetic/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astarithmetic
-astarithmetic_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astarithmetic_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astarithmetic_SOURCES = main.c ui.c arithmetic.c operands.c
diff --git a/bin/buildprog/Makefile.am b/bin/buildprog/Makefile.am
index 1b1e724..7555f03 100644
--- a/bin/buildprog/Makefile.am
+++ b/bin/buildprog/Makefile.am
@@ -34,7 +34,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib \
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astbuildprog
-astbuildprog_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astbuildprog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astbuildprog_SOURCES = main.c ui.c buildprog.c astbuildprog.conf
diff --git a/bin/convertt/Makefile.am b/bin/convertt/Makefile.am
index 0e86e59..964ae87 100644
--- a/bin/convertt/Makefile.am
+++ b/bin/convertt/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astconvertt
-astconvertt_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astconvertt_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astconvertt_SOURCES = main.c ui.c convertt.c
diff --git a/bin/convolve/Makefile.am b/bin/convolve/Makefile.am
index 3cb2b03..88f2a34 100644
--- a/bin/convolve/Makefile.am
+++ b/bin/convolve/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astconvolve
-astconvolve_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astconvolve_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astconvolve_SOURCES = main.c ui.c convolve.c
diff --git a/bin/cosmiccal/Makefile.am b/bin/cosmiccal/Makefile.am
index 39da4cc..480b94b 100644
--- a/bin/cosmiccal/Makefile.am
+++ b/bin/cosmiccal/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astcosmiccal
-astcosmiccal_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astcosmiccal_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astcosmiccal_SOURCES = main.c ui.c cosmiccal.c
diff --git a/bin/crop/Makefile.am b/bin/crop/Makefile.am
index 36680b7..12d1ad6 100644
--- a/bin/crop/Makefile.am
+++ b/bin/crop/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astcrop
-astcrop_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astcrop_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
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 e1eafa0..f7f998a 100644
--- a/bin/fits/Makefile.am
+++ b/bin/fits/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astfits
-astfits_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astfits_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
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 adaca2c..6f707a5 100644
--- a/bin/match/Makefile.am
+++ b/bin/match/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmatch
-astmatch_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astmatch_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astmatch_SOURCES = main.c ui.c match.c
diff --git a/bin/mkcatalog/Makefile.am b/bin/mkcatalog/Makefile.am
index 7ad37d8..f0cd7fc 100644
--- a/bin/mkcatalog/Makefile.am
+++ b/bin/mkcatalog/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmkcatalog
-astmkcatalog_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astmkcatalog_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
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 91e4e47..30168b1 100644
--- a/bin/mknoise/Makefile.am
+++ b/bin/mknoise/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmknoise
-astmknoise_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astmknoise_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astmknoise_SOURCES = main.c ui.c mknoise.c
diff --git a/bin/mkprof/Makefile.am b/bin/mkprof/Makefile.am
index 6840a1a..572e243 100644
--- a/bin/mkprof/Makefile.am
+++ b/bin/mkprof/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astmkprof
-astmkprof_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astmkprof_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
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 5d86949..fc75ef2 100644
--- a/bin/noisechisel/Makefile.am
+++ b/bin/noisechisel/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astnoisechisel
-astnoisechisel_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astnoisechisel_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astnoisechisel_SOURCES = main.c ui.c detection.c noisechisel.c sky.c \
threshold.c
diff --git a/bin/segment/Makefile.am b/bin/segment/Makefile.am
index b1e3ab8..3e93530 100644
--- a/bin/segment/Makefile.am
+++ b/bin/segment/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astsegment
-astsegment_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astsegment_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astsegment_SOURCES = main.c ui.c segment.c clumps.c
diff --git a/bin/statistics/Makefile.am b/bin/statistics/Makefile.am
index d0dddcf..f73fd99 100644
--- a/bin/statistics/Makefile.am
+++ b/bin/statistics/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = aststatistics
-aststatistics_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+aststatistics_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
aststatistics_SOURCES = main.c ui.c sky.c statistics.c
diff --git a/bin/table/Makefile.am b/bin/table/Makefile.am
index 6d8cd40..b39485d 100644
--- a/bin/table/Makefile.am
+++ b/bin/table/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = asttable
-asttable_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+asttable_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
asttable_SOURCES = main.c ui.c table.c
diff --git a/bin/warp/Makefile.am b/bin/warp/Makefile.am
index 501c4c1..a32f4bc 100644
--- a/bin/warp/Makefile.am
+++ b/bin/warp/Makefile.am
@@ -28,7 +28,8 @@ AM_CPPFLAGS = -I\$(top_srcdir)/bootstrapped/lib
-I\$(top_srcdir)/lib
## Program definition (name, linking, sources and headers)
bin_PROGRAMS = astwarp
-astwarp_LDADD = -lgnuastro
+## Reason for linking with `libgnu' described in `bin/TEMPLATE/Makefile.am'.
+astwarp_LDADD = $(top_builddir)/bootstrapped/lib/libgnu.la -lgnuastro
astwarp_SOURCES = main.c ui.c warp.c
diff --git a/doc/announce-acknowledge.txt b/doc/announce-acknowledge.txt
index 68ec251..b36eb58 100644
--- a/doc/announce-acknowledge.txt
+++ b/doc/announce-acknowledge.txt
@@ -6,6 +6,7 @@ Nima Dehdilani
Antonio Diaz Diaz
Lee Kelvin
Brandon Kelly
+Alan Lefor
Guillaume Mahler
Bertrand Pain
Ole Streicher