Bug 90593

Summary: [EFL][GTK] jhbuild : Disable pixman demos build depending on GTK+
Product: WebKit Reporter: Dongwoo Joshua Im (dwim) <dw.im>
Component: WebKit EFLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, donggwan.kim, d-r, gyuyoung.kim, gyuyoung.kim, lucas.de.marchi, pnormand, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: Linux   
Attachments:
Description Flags
Patch
none
Patch
pnormand: review-, pnormand: commit-queue-
Patch none

Description Dongwoo Joshua Im (dwim) 2012-07-05 01:54:04 PDT
When I tried to build efl port, I got pixman build error when the jhbuild is running. 
  - undefined reference to `g_resources_lookup_data'.
  - some more undefined references.

If we give glib build dependency to pixman, it can be solved.
Comment 1 Dongwoo Joshua Im (dwim) 2012-07-05 01:55:41 PDT
Created attachment 150894 [details]
Patch
Comment 2 Gyuyoung Kim 2012-07-05 03:20:24 PDT
To add glib dependency is not difficult problem. I wonder why there was this problem before. I think intel guys need take a look this.

CC'ing dominik and christophe.
Comment 3 Gyuyoung Kim 2012-07-05 03:21:42 PDT
(In reply to comment #2)
> To add glib dependency is not difficult problem. I wonder why there was this problem before. I think intel guys need take a look this.
> 
> CC'ing dominik and christophe.

I wonder why there was this problem before. => I wonder why there was no this problem before.
Comment 4 Dongwoo Joshua Im (dwim) 2012-07-05 04:09:05 PDT
Created attachment 150920 [details]
Patch

I got same error when I try to build gtk port.
  - undefined reference to `g_resources_lookup_data'.
  - undefined reference to `g_resources_open_stream'
  - undefined reference to `g_resources_get_info'

So, I've fixed gtk port, as well.
Comment 5 Dongwoo Joshua Im (dwim) 2012-07-05 04:10:30 PDT
*** Bug 90599 has been marked as a duplicate of this bug. ***
Comment 6 Philippe Normand 2012-07-05 08:29:59 PDT
That's odd because pixman does not have any explicit dependency to glib, AFAIK. Can you paste the link error please?
Comment 7 Dongwoo Joshua Im (dwim) 2012-07-05 18:54:29 PDT
(In reply to comment #6)
> That's odd because pixman does not have any explicit dependency to glib, AFAIK. Can you paste the link error please?

I've pasted those at the previous comments ;)

I paste those here again.

They are link error during building pixman.
  - undefined reference to `g_resources_lookup_data'.
  - undefined reference to `g_resources_open_stream'
  - undefined reference to `g_resources_get_info'
Comment 8 Philippe Normand 2012-07-05 19:20:12 PDT
I wasn't clear, sorry. Including the command line please.
Comment 9 Dongwoo Joshua Im (dwim) 2012-07-05 19:27:01 PDT
(In reply to comment #8)
> I wasn't clear, sorry. Including the command line please.

Actually, I executed this command below.

Tools/Script/build-webkit --efl (--gtk)

pixman is the first library which jhbuild try to build, and it failed.
Comment 10 Dongwoo Joshua Im (dwim) 2012-07-05 19:28:53 PDT
(In reply to comment #6)
> That's odd because pixman does not have any explicit dependency to glib, AFAIK. Can you paste the link error please?

As I know, pixman has libc dependency,
that's why this problem is solved when I gave the "glib" dependency to the pixman.

Do we need to add "glibc" itself in the jhbuild?
Or, just give the "glib" dependency to the pixman..?
Comment 11 Philippe Normand 2012-07-05 19:43:28 PDT
(In reply to comment #10)
> (In reply to comment #6)
> > That's odd because pixman does not have any explicit dependency to glib, AFAIK. Can you paste the link error please?
> 
> As I know, pixman has libc dependency,
> that's why this problem is solved when I gave the "glib" dependency to the pixman.
> 
> Do we need to add "glibc" itself in the jhbuild?
> Or, just give the "glib" dependency to the pixman..?

Dude. glibc != glib....
As I asked in comment 9, can you provide the command line that fails? Which means, to be clear, the ld command that triggers this link error.
Comment 12 Dongwoo Joshua Im (dwim) 2012-07-05 22:19:29 PDT
(In reply to comment #11)
> 
> Dude. glibc != glib....
> As I asked in comment 9, can you provide the command line that fails? Which means, to be clear, the ld command that triggers this link error.

Ye... I know those are different.. ;)


Below is the error log.
When trying to link clip-test, link error is occurred.

make[2]: Entering directory `./WebKitBuild/Dependencies/Source/pixman-0.24.0/demos'
  CC     clip-test.o
  CC     gtk-utils.o
  CCLD   clip-test
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_lookup_data'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_open_stream'
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_get_info'



These are the libraries which the CCLD command links.

  clip_test_LDADD = $(LDADD)
  LDADD = $(top_builddir)/pixman/libpixman-1.la -lm $(GTK_LIBS) $(PNG_LIBS)

GTK_LIBS are below.

  GTK_LIBS = -L/usr/local/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lcairo -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lpixman-1

That's why we need to build glib library before we build the pixman.
Comment 13 Dongwoo Joshua Im (dwim) 2012-07-06 00:19:44 PDT
(In reply to comment #12)
> /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_lookup_data'
> /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_open_stream'
> /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libgdk_pixbuf-2.0.so: undefined reference to `g_resources_get_info'
> 

As we can see from this build log, pixman needs gdk_pixbuf library to build, for some reason.

To build pixman using the jhbuild on any system, I think we need to build gdk_pixbuf before building pixman.

we can simply give 'gdk_pixbuf' dependency to 'pixman', 
or build glib for the first time. (maybe, for gtk port, after 'make' will be fine.)
Comment 14 Philippe Normand 2012-07-06 06:44:29 PDT
Ah so GTK+ is needed for the demos, but it can be disabled with --enable-gtk=no at configure time. I would prefer this approach!
Comment 15 Philippe Normand 2012-07-06 07:40:47 PDT
Comment on attachment 150920 [details]
Patch

Please use --enable-gtk=no at configure time instead.
Comment 16 Dongwoo Joshua Im (dwim) 2012-07-06 08:21:57 PDT
Created attachment 151086 [details]
Patch
Comment 17 Dongwoo Joshua Im (dwim) 2012-07-06 08:32:06 PDT
(In reply to comment #15)
> (From update of attachment 150920 [details])
> Please use --enable-gtk=no at configure time instead.

With this option, pixman is built successfully on my system.
Comment 18 Dongwoo Joshua Im (dwim) 2012-07-06 08:42:04 PDT
wow! 
thanks for the kind help and review~!
Comment 19 WebKit Review Bot 2012-07-06 09:01:48 PDT
Comment on attachment 151086 [details]
Patch

Clearing flags on attachment: 151086

Committed r121975: <http://trac.webkit.org/changeset/121975>
Comment 20 WebKit Review Bot 2012-07-06 09:01:54 PDT
All reviewed patches have been landed.  Closing bug.