Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2015-01-16 Thread Michael Tautschnig
Hello,

On Thu, Jan 15, 2015 at 21:16:49 +0200, أحمد المحمودي wrote:
 On Fri, Aug 15, 2014 at 11:57:34PM +0100, Michael Tautschnig wrote:
  Looking into this indeed two different definitions of FRIBIDI_UNICHAR_LOCAL 
  are
  being picked up.
  
  In lib/.libs/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL expands to wchar_t
  (from line 95), whereas in bin/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL
  expands to fribidi_uint32 (from line 97).
  
  This difference is caused by SIZEOF_WCHAR_T being undefined (!) in
  bin/fribidi-bidi-types.o. This, again, is the result of 
  bin/fribidi-bidi-types.c
  not actually including config.h, whereas lib/fribidi-bidi-types.c would 
  include
  lib/common.h, when eventually does include config.h.
  
  It seems the problem would best be fixed by uniformly having
  
  #if HAVE_CONFIG_H+0
  # include config.h
  #endif
  
  as first preprocessor directive in every .c file (this is taken from 
  common.h).
 ---end quoted text---
 
   Well, seems to me that this might rather be a problem with the 
   upstream build scripts.
 
   I think that the object files in bin/ should actually be linked against the 
   built libfribidi.so instead of being linked against the object files 
   in lib/
 
   What do you think ?
 

I'm not really sure this is an appropriate solution - unless the files in lib/
are not used at all? If, however, they are used, then linking differently will
not solve the problem that the object files themselves are built with
inconsistent information.

So my opinion is:

- If the files in lib/ aren't used, then linking against libfribidi.so is good,
  but then there's the question of what lib/ is good for at all?
- If, on the other hand, those files are used, then all of them should have
  SIZEOF_WCHAR_T defined (possibly by including config.h).

Best,
Michael



pgp9x9KyrSF8M.pgp
Description: PGP signature


Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2015-01-15 Thread أحمد المحمودي
On Fri, Aug 15, 2014 at 11:57:34PM +0100, Michael Tautschnig wrote:
 Looking into this indeed two different definitions of FRIBIDI_UNICHAR_LOCAL 
 are
 being picked up.
 
 In lib/.libs/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL expands to wchar_t
 (from line 95), whereas in bin/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL
 expands to fribidi_uint32 (from line 97).
 
 This difference is caused by SIZEOF_WCHAR_T being undefined (!) in
 bin/fribidi-bidi-types.o. This, again, is the result of 
 bin/fribidi-bidi-types.c
 not actually including config.h, whereas lib/fribidi-bidi-types.c would 
 include
 lib/common.h, when eventually does include config.h.
 
 It seems the problem would best be fixed by uniformly having
 
 #if HAVE_CONFIG_H+0
 # include config.h
 #endif
 
 as first preprocessor directive in every .c file (this is taken from 
 common.h).
---end quoted text---

  Well, seems to me that this might rather be a problem with the 
  upstream build scripts.

  I think that the object files in bin/ should actually be linked against the 
  built libfribidi.so instead of being linked against the object files 
  in lib/

  What do you think ?

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7


signature.asc
Description: Digital signature


Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2014-08-15 Thread Michael Tautschnig
Hello,

My apologies for taking so long to get back to you.

 Hi,
 
  This build failed on which arch. ?
  
 
 This is on an amd64 system.
 
  In both files I see the declaration is the same:
  
  FRIBIDI_ENTRY FriBidiCharType
  fribidi_get_bidi_type (
FriBidiChar ch/* input character */
  ) FRIBIDI_GNUC_CONST;
  
  FriBidiChar is defined in lib/fribidi-types.h:
  typedef FRIBIDI_UNICHAR FriBidiChar;
  
  in the same header file, FRIBIDI_UNICHAR is defined as follows:
  #ifndef FRIBIDI_UNICHAR
  # define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
  #endif /* !FRIBIDI_UNICHAR */
  
  FRIBIDI_UNICHAR_LOCAL is also defined in lib/fribidi-types.h (a 59 lines 
  piece of code)
  
 
 Well, there are actually three possible definitions here (lines 52, 95, 98):
 
 http://sources.debian.net/src/fribidi/0.19.5-2/lib/fribidi-types.h?hl=52,95,98#L52
 
 
 I will, however, investigate further to check which of the preprocessor macros
 kicks in. I will get back to you once this is done.
 

Looking into this indeed two different definitions of FRIBIDI_UNICHAR_LOCAL are
being picked up.

In lib/.libs/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL expands to wchar_t
(from line 95), whereas in bin/fribidi-bidi-types.o, FRIBIDI_UNICHAR_LOCAL
expands to fribidi_uint32 (from line 97).

This difference is caused by SIZEOF_WCHAR_T being undefined (!) in
bin/fribidi-bidi-types.o. This, again, is the result of bin/fribidi-bidi-types.c
not actually including config.h, whereas lib/fribidi-bidi-types.c would include
lib/common.h, when eventually does include config.h.

It seems the problem would best be fixed by uniformly having

#if HAVE_CONFIG_H+0
# include config.h
#endif

as first preprocessor directive in every .c file (this is taken from common.h).

Best,
Michael



pgplE0ewx5dA3.pgp
Description: PGP signature


Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2014-07-07 Thread Michael Tautschnig
Hi,

 This build failed on which arch. ?
 

This is on an amd64 system.

 In both files I see the declaration is the same:
 
 FRIBIDI_ENTRY FriBidiCharType
 fribidi_get_bidi_type (
   FriBidiChar ch  /* input character */
 ) FRIBIDI_GNUC_CONST;
 
 FriBidiChar is defined in lib/fribidi-types.h:
 typedef FRIBIDI_UNICHAR FriBidiChar;
 
 in the same header file, FRIBIDI_UNICHAR is defined as follows:
 #ifndef FRIBIDI_UNICHAR
 # define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
 #endif /* !FRIBIDI_UNICHAR */
 
 FRIBIDI_UNICHAR_LOCAL is also defined in lib/fribidi-types.h (a 59 lines 
 piece of code)
 

Well, there are actually three possible definitions here (lines 52, 95, 98):

http://sources.debian.net/src/fribidi/0.19.5-2/lib/fribidi-types.h?hl=52,95,98#L52


I will, however, investigate further to check which of the preprocessor macros
kicks in. I will get back to you once this is done.

Best,
Michael



pgpn9oSMPinf6.pgp
Description: PGP signature


Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2014-07-07 Thread أحمد المحمودي
This build failed on which arch. ?

In both files I see the declaration is the same:

FRIBIDI_ENTRY FriBidiCharType
fribidi_get_bidi_type (
  FriBidiChar ch/* input character */
) FRIBIDI_GNUC_CONST;

FriBidiChar is defined in lib/fribidi-types.h:
typedef FRIBIDI_UNICHAR FriBidiChar;

in the same header file, FRIBIDI_UNICHAR is defined as follows:
#ifndef FRIBIDI_UNICHAR
# define FRIBIDI_UNICHAR FRIBIDI_UNICHAR_LOCAL
#endif /* !FRIBIDI_UNICHAR */

FRIBIDI_UNICHAR_LOCAL is also defined in lib/fribidi-types.h (a 59 lines 
piece of code)

-- 
 ‎أحمد المحمودي (Ahmed El-Mahmoudy)
  Digital design engineer
 GPG KeyID: 0xEDDDA1B7
 GPG Fingerprint: 8206 A196 2084 7E6D 0DF8  B176 BC19 6A94 EDDD A1B7


signature.asc
Description: Digital signature


Bug#751503: fribidi: Parameter declarations of function fribidi_get_bidi_type differ in signedness

2014-06-13 Thread Michael Tautschnig
Package: fribidi
Version: 0.19.6-1
Severity: wishlist
Usertags: goto-cc
Tags: upstream

During a rebuild of all Debian packages in a clean sid chroot (using cowbuilder
and pbuilder) the build failed with the following error. Please note that we
use our research compiler tool-chain (using tools from the cbmc package), which
permits extended reporting on type inconsistencies at link time.

[...]
  CCLD fribidi-bidi-types

error: conflicting function declarations fribidi_get_bidi_type
old definition in module fribidi-bidi-types file ../lib/fribidi-bidi-types.h 
line 352
int (unsigned int)
new definition in module fribidi-bidi-types file fribidi-bidi-types.c line 58
int (signed int ch)
Makefile:453: recipe for target 'fribidi-bidi-types' failed
make[3]: *** [fribidi-bidi-types] Error 64
make[3]: Leaving directory 
'/srv/jenkins-slave/workspace/sid-goto-cc-fribidi/fribidi-0.19.6/bin'
Makefile:493: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1

Assuming that all values passed in fit into a positive signed int, this is
really just about helping the compiler generate appropriate diagnostics: the
declaration in fribidi-bidi-types.h should be adjusted to match the actual
definition.

Best,
Michael

PS.: I believe this is an upstream issue, but don't hold an account with
upstream's development system. If the maintainer does, please feel free to
forward. Thanks!



pgp07E6XDL_55.pgp
Description: PGP signature