Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

View: New views
7 Messages — Rating Filter:   Alert me  

Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Samuli Suominen-4 :: Rate this Message:

| View Threaded | Show Only this Message

This check in configure.ac is not working:

AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether
Fribidi is version 2])], [], [#include <fribidi/fribidi-bidi-types.h>])

Because it's not getting the CFLAGS from fribidi.pc first:

configure:5111: checking for FriBidiParType
configure:5111: x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe
conftest.c >&5
In file included from /usr/include/fribidi/fribidi-bidi-types.h:36:0,
                  from conftest.c:29:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No
such file or directory

It breaks the compilation for fribidi-0.19.2 users later as following:

After recent updates dvdauthor-0.7.0 fails to build:
In file included from /usr/include/fribidi/fribidi.h:40:0,
                  from subreader.c:50:
/usr/include/fribidi/fribidi-bidi-types.h:193:3: error: conflicting
types for ‘FriBidiCharType’
/usr/include/fribidi/fribidi-bidi-types.h:182:3: note: previous
declaration of ‘FriBidiCharType’ was here
subreader.c: In function ‘sub_fribidi’:
subreader.c:493:11: warning: ‘fribidi_log2vis’ is deprecated (declared
at /usr/include/fribidi/fribidi-deprecated.h:198)
subreader.c:509:15: warning: ‘fribidi_remove_bidi_marks’ is deprecated
(declared at /usr/include/fribidi/fribidi-deprecated.h:169)
subreader.c: In function ‘sub_read_file’:
subreader.c:2145:7: warning: suggest parentheses around ‘&&’ within ‘||’
subfont.c: In function ‘done_freetype’:
subfont.c:940:9: warning: unused variable ‘err’
spuunmux.c: In function ‘cmap_find’:
spuunmux.c:555:21: warning: suggest parentheses around arithmetic in
operand of ‘|’
spuunmux.c: In function ‘main’:
spuunmux.c:1341:27: warning: suggest parentheses around ‘&&’ within ‘||’
spuunmux.c:1189:23: warning: ignoring return value of ‘fscanf’, declared
with attribute warn_unused_result
spuunmux.c:1302:22: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result
spuunmux.c:1319:30: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result
spuunmux.c:1420:34: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result
spuunmux.c:1449:30: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result
spuunmux.c:1588:26: warning: ignoring return value of ‘fread’, declared
with attribute warn_unused_result
make[2]: *** [subreader.o] Error 1

Please fix the configure.ac check for FRIBIDI2 to query CFLAGS from the
pkg-config file of fribidi first.

This was reported here:

http://bugs.gentoo.org/show_bug.cgi?id=417041

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Lawrence D'Oliveiro-2 :: Rate this Message:

| View Threaded | Show Only this Message

On Tue, 22 May 2012 13:07:13 +0300, Samuli Suominen wrote:

> This check in configure.ac is not working:
>
> AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether
> Fribidi is version 2])], [], [#include
> <fribidi/fribidi-bidi-types.h>])
>
> Because it's not getting the CFLAGS from fribidi.pc first:
>
> configure:5111: checking for FriBidiParType
> configure:5111: x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe
> conftest.c >&5
> In file included from /usr/include/fribidi/fribidi-bidi-types.h:36:0,
>                   from conftest.c:29:
> /usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No
> such file or directory

I don’t understand what the issue is here. I have libfribidi-dev
0.19.2-3 installed on my Debian Unstable system, and line 65
of /usr/include/fribidi/fribidi-common.h is this:

    #  include <glib/gmacros.h>

which is clearly not including glib.h. Where are you getting this
different version of FriBidi?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Lawrence D'Oliveiro-2 :: Rate this Message:

| View Threaded | Show Only this Message

I wrote:

> I have libfribidi-dev 0.19.2-3 installed on my Debian Unstable
> system, and line 65 of /usr/include/fribidi/fribidi-common.h is this:
>
>     #  include <glib/gmacros.h>
>
> which is clearly not including glib.h. Where are you getting this
> different version of FriBidi?

Ah, I think I understand a bit better now: FriBidi can be configured to
use glib or not, it’s just that Debian configures it not.

I’m not expert enough with Automake to see how to easily fix the
FriBidiParType test to take this into account. Should I

1) drop the test altogether and assume it’s always FriBidi2, or
2) replace the AC_CHECK_TYPE call with a more elaborate setup for a call
to the C compiler which includes “$(pkg-config fribidi)”?

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Lawrence D'Oliveiro-2 :: Rate this Message:

| View Threaded | Show Only this Message

Is this patch sufficient to solve the problem? Just reordering the
AC_CHECK_TYPE to after the AC_SUBST calls so the compiler invocation
should (hopefully) include the right flags for including FriBidi:

--- a/configure.ac
+++ b/configure.ac
@@ -89,9 +89,9 @@ AC_SUBST(FONTCONFIG_CFLAGS)
 AC_SUBST(FONTCONFIG_LIBS)
 
 PKG_CHECK_MODULES([FRIBIDI], [fribidi], [AC_DEFINE(HAVE_FRIBIDI, 1, [whether FriBidi is available])], [:])
-AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether Fribidi is version 2])], [], [#include <fribidi/fribidi-bidi-types.h>])
 AC_SUBST(FRIBIDI_CFLAGS)
 AC_SUBST(FRIBIDI_LIBS)
+AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether Fribidi is version 2])], [], [#include <fribidi/fribidi-bidi-types.h>])
 
 AC_CHECK_PROGS(FREETYPECONFIG, [freetype-config])
 if test -n "$FREETYPECONFIG"; then


Let me know if it is, and I will commit it.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Samuli Suominen-4 :: Rate this Message:

| View Threaded | Show Only this Message

On 05/24/2012 10:49 AM, Lawrence D'Oliveiro wrote:

> On Tue, 22 May 2012 13:07:13 +0300, Samuli Suominen wrote:
>
>> This check in configure.ac is not working:
>>
>> AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether
>> Fribidi is version 2])], [], [#include
>> <fribidi/fribidi-bidi-types.h>])
>>
>> Because it's not getting the CFLAGS from fribidi.pc first:
>>
>> configure:5111: checking for FriBidiParType
>> configure:5111: x86_64-pc-linux-gnu-gcc -c -march=native -O2 -pipe
>> conftest.c>&5
>> In file included from /usr/include/fribidi/fribidi-bidi-types.h:36:0,
>>                    from conftest.c:29:
>> /usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No
>> such file or directory
>
> I don’t understand what the issue is here. I have libfribidi-dev
> 0.19.2-3 installed on my Debian Unstable system, and line 65
> of /usr/include/fribidi/fribidi-common.h is this:
>
>      #  include<glib/gmacros.h>
>
> which is clearly not including glib.h. Where are you getting this
> different version of FriBidi?

Indeed. We ship fribidi in Gentoo with glib support always enabled. We
had too many issues with it disabled.

And just to clarify:

And the reason for this minor (and unrelated) difference of <glib.h> and
<glib/gmacros.h> is that starting from glib version 2.31 it doesn't
allow including <glib/gmacros.h> separately anymore and <glib.h> should
be included directly.

The <glib/gmacros.h> from glib-2.32.3 looks like this at the head of the
file:

#if !defined (__GLIB_H_INSIDE__) && !defined (GLIB_COMPILATION)
#error "Only <glib.h> can be included directly."
#endif

Therefore we drop in this patch to fribidi-0.19.2:

http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/dev-libs/fribidi/files/fribidi-0.19.2-glib-2.31.patch?view=markup

OK, replying to the patch test-request on the another message now... Moment.

- Samuli

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Samuli Suominen-4 :: Rate this Message:

| View Threaded | Show Only this Message

On 05/24/2012 11:36 AM, Lawrence D'Oliveiro wrote:

> Is this patch sufficient to solve the problem? Just reordering the
> AC_CHECK_TYPE to after the AC_SUBST calls so the compiler invocation
> should (hopefully) include the right flags for including FriBidi:
>
> --- a/configure.ac
> +++ b/configure.ac
> @@ -89,9 +89,9 @@ AC_SUBST(FONTCONFIG_CFLAGS)
>   AC_SUBST(FONTCONFIG_LIBS)
>
>   PKG_CHECK_MODULES([FRIBIDI], [fribidi], [AC_DEFINE(HAVE_FRIBIDI, 1, [whether FriBidi is available])], [:])
> -AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether Fribidi is version 2])], [], [#include<fribidi/fribidi-bidi-types.h>])
>   AC_SUBST(FRIBIDI_CFLAGS)
>   AC_SUBST(FRIBIDI_LIBS)
> +AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether Fribidi is version 2])], [], [#include<fribidi/fribidi-bidi-types.h>])
>
>   AC_CHECK_PROGS(FREETYPECONFIG, [freetype-config])
>   if test -n "$FREETYPECONFIG"; then
>
>
> Let me know if it is, and I will commit it.
Unfortunately this did not change anything, after reordering and
rerunning autoreconf I still see:

configure:5131: checking for FriBidiParType
configure:5131: gcc -c -g -O2  conftest.c >&5
In file included from /usr/include/fribidi/fribidi-bidi-types.h:36:0,
                  from conftest.c:29:
/usr/include/fribidi/fribidi-common.h:65:20: fatal error: glib.h: No
such file or directory

I don't think it's useful to support older fribidi anymore, so this
would work:

diff -ur dvdauthor.orig/configure.ac dvdauthor/configure.ac
--- dvdauthor.orig/configure.ac 2010-10-23 05:26:49.000000000 +0300
+++ dvdauthor/configure.ac 2012-05-24 13:05:13.698298854 +0300
@@ -81,8 +81,7 @@
  AC_SUBST(FONTCONFIG_CFLAGS)
  AC_SUBST(FONTCONFIG_LIBS)

-PKG_CHECK_MODULES([FRIBIDI], [fribidi], [AC_DEFINE(HAVE_FRIBIDI, 1,
[whether FriBidi is available])], [:])
-AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether
Fribidi is version 2])], [], [#include <fribidi/fribidi-bidi-types.h>])
+PKG_CHECK_MODULES([FRIBIDI], [fribidi >= 0.19.2],
[AC_DEFINE(HAVE_FRIBIDI, 1, [whether FriBidi is available])], [:])
  AC_SUBST(FRIBIDI_CFLAGS)
  AC_SUBST(FRIBIDI_LIBS)

diff -ur dvdauthor.orig/src/compat.h dvdauthor/src/compat.h
--- dvdauthor.orig/src/compat.h 2010-04-20 13:37:02.000000000 +0300
+++ dvdauthor/src/compat.h 2012-05-24 13:05:34.428297204 +0300
@@ -98,9 +98,6 @@

  #ifdef HAVE_FRIBIDI
  #define BUILDSPEC_FRIBIDI " fribidi"
-#ifndef HAVE_FRIBIDI2
-#define FriBidiParType FriBidiCharType
-#endif
  #else
  #define BUILDSPEC_FRIBIDI ""
  #endif

[dvdauthor.patch]

diff -ur dvdauthor.orig/configure.ac dvdauthor/configure.ac
--- dvdauthor.orig/configure.ac 2010-10-23 05:26:49.000000000 +0300
+++ dvdauthor/configure.ac 2012-05-24 13:05:13.698298854 +0300
@@ -81,8 +81,7 @@
 AC_SUBST(FONTCONFIG_CFLAGS)
 AC_SUBST(FONTCONFIG_LIBS)
 
-PKG_CHECK_MODULES([FRIBIDI], [fribidi], [AC_DEFINE(HAVE_FRIBIDI, 1, [whether FriBidi is available])], [:])
-AC_CHECK_TYPE(FriBidiParType, [AC_DEFINE(HAVE_FRIBIDI2, 1, [Whether Fribidi is version 2])], [], [#include <fribidi/fribidi-bidi-types.h>])
+PKG_CHECK_MODULES([FRIBIDI], [fribidi >= 0.19.2], [AC_DEFINE(HAVE_FRIBIDI, 1, [whether FriBidi is available])], [:])
 AC_SUBST(FRIBIDI_CFLAGS)
 AC_SUBST(FRIBIDI_LIBS)
 
diff -ur dvdauthor.orig/src/compat.h dvdauthor/src/compat.h
--- dvdauthor.orig/src/compat.h 2010-04-20 13:37:02.000000000 +0300
+++ dvdauthor/src/compat.h 2012-05-24 13:05:34.428297204 +0300
@@ -98,9 +98,6 @@
 
 #ifdef HAVE_FRIBIDI
 #define BUILDSPEC_FRIBIDI " fribidi"
-#ifndef HAVE_FRIBIDI2
-#define FriBidiParType FriBidiCharType
-#endif
 #else
 #define BUILDSPEC_FRIBIDI ""
 #endif


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer

Re: Check for FRIBIDI2 (FriBidiParType) in configure.ac is broken because it's not using CFLAGS from fribidi.pc (pkg-config)

by Lawrence D'Oliveiro-2 :: Rate this Message:

| View Threaded | Show Only this Message

OK, I have dropped support for older FriBidi.

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Dvdauthor-developer mailing list
Dvdauthor-developer@...
https://lists.sourceforge.net/lists/listinfo/dvdauthor-developer