bugGNU Enscript - Bugs: bug #56921, enscript git version does not build

 
 

bug #56921: enscript git version does not build

Submitter:  Tomasz Kłoczko <kloczek>
Submitted:  Thu 19 Sep 2019 11:06:33 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 10 Feb 2023 09:34:28 PM UTC, comment #1: 

afm.c will build with -DPROTOTYPES

src/util.c needs langinfo.h included.

I'm trying to debug a segfault on Debian Stable and can build with:

  ./configure --prefix=/usr --sysconfdir=/etc CFLAGS=-DPROTOTYPES
  make

to get a replacement binary (using my same config files) with the patch below.

But, yeah, the current git still won't build today with:

gcc version 10.2.1 20210110 (Debian 10.2.1-6)



-----

diff --git a/src/util.c b/src/util.c
index d53d8f0..8b04529 100644
--- a/src/util.c
+++ b/src/util.c
@@ -23,6 +23,7 @@
  */
 
 #include "gsint.h"
+#include "langinfo.h"
 
 /*
  * Types and definitions.

Bill McGonigle <bill_mcgonigle>
Thu 19 Sep 2019 11:06:33 PM UTC, original submission:  

Build fails on

make[2]: Entering directory '/home/tkloczko/rpmbuild/BUILD/enscript-1.6.6/afmlib'
gcc -DHAVE_CONFIG_H -I. -I..     -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -flto -c -o afm.o afm.c
afm.c:510:1: error: conflicting types for ‘afm_font_charwidth’
  510 | afm_font_charwidth (AFMFont font, AFMNumber ptsize, char ch,
      | ^~~~~~~~~~~~~~~~~~
afm.c:512:1: note: an argument type that has a default promotion can’t match an empty parameter name list declaration
  512 | {
      | ^
In file included from afmint.h:87,
                 from afm.c:23:
afm.h:414:10: note: previous declaration of ‘afm_font_charwidth’ was here
  414 | AFMError afm_font_charwidth ___P ((AFMFont font, AFMNumber ptsize,
      |          ^~~~~~~~~~~~~~~~~~
afm.c:551:1: error: conflicting types for ‘afm_font_encode’
  551 | afm_font_encode (AFMFont font, unsigned char code, char *name,
      | ^~~~~~~~~~~~~~~
afm.c:553:1: note: an argument type that has a default promotion can’t match an empty parameter name list declaration
  553 | {
      | ^
In file included from afmint.h:87,
                 from afm.c:23:
afm.h:423:10: note: previous declaration of ‘afm_font_encode’ was here
  423 | AFMError afm_font_encode ___P ((AFMFont font, unsigned char code, char *name,
      |          ^~~~~~~~~~~~~~~
make[2]: * [Makefile:477: afm.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/enscript-1.6.6/afmlib'
make[1]: * [Makefile:467: all-recursive] Error 1
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/enscript-1.6.6'
make: * [Makefile:406: all] Error 2

Tomasz Kłoczko <kloczek>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bill_mcgonigle (Posted a comment)
  • -email is unavailable- added by kloczek (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code