Menu

#291 gcc accepts -g ... yes ... yes ... yes ... no!

djview
wont-fix
nobody
None
8
2018-10-07
2018-06-13
No

I just built djview4 for Debian, and noticed that the debugging symbol packages were basically empty, and looking at the build log found this:

$ egrep -n ' [-]g' ../djview4_4.10.6-5_amd64.build
1706: checking whether gcc accepts -g... yes
1723: checking whether gcc accepts -g... (cached) yes
1729: checking whether g++ accepts -g... yes
1733: checking whether gcc accepts -g... no

I have not looked in any detail, but ... Objective C?

$ egrep -B1 -n ' [-]g' ../djview4_4.10.6-5_amd64.build
1705-checking whether we are using the GNU C compiler... yes
1706:checking whether gcc accepts -g... yes
--
1722-checking whether we are using the GNU C compiler... (cached) yes
1723:checking whether gcc accepts -g... (cached) yes
--
1728-checking whether we are using the GNU C++ compiler... yes
1729:checking whether g++ accepts -g... yes
--
1732-checking whether we are using the GNU Objective C compiler... no
1733:checking whether gcc accepts -g... no

Obviously this isn't breaking anything, but it seemed like a wart that should be shaved off.

Discussion

  • Leon Bottou

    Leon Bottou - 2018-06-14

    On Wednesday, June 13, 2018 1:46:36 PM EDT Barak A. Pearlmutter wrote:

    I have not looked in any detail, but ... Objective C?

    Yes indeed.
    The objective-c compiler is useful when building on a mac (see the directory "mac").
    Because some Makefile.am demand objective c, automake wants me to have AC_PROG_OBJC which returns 'gcc'.
    But when the package 'gobjc' is not installed, trying to compile an objective-c file fails.
    This is why the test for -g fails.
    Turns out that we don't need objective-c at all under linux.
    So the compilation succeeds anyway.
    But the -g flags has been disabled.

    I could not find a way to tell automake that we don't really need objective c.
    So I guess that a solution is to add "gobjc" in the build-depends??????

    • Leon
     
  • Leon Bottou

    Leon Bottou - 2018-10-07

    I had another long look at automake conditionals and I cannot find a way to make this test disappear when not running on a mac. My recommendation is still to have gobcs in the build dependencies...

     
  • Leon Bottou

    Leon Bottou - 2018-10-07
    • status: open --> wont-fix
     

Log in to post a comment.