Skip to contentSkip to conversation

Trying to package imlib2

Buildroot Frederic Bassaler 2 participants 5 messages Aug 11, 2011

lore
Share & tools
lore
#0 lore raw

I'm trying to package the imlib2, which I need as a dependency for wbar (a small dock app launcher for X)

here's my imlib2.mk :

#############################################################
#
# IMLIB2
#
#############################################################
IMLIB2_VERSION = 1.4.4
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 IMLIB2_SITE =
http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)/
IMLIB2_INSTALL_STAGING = YES IMLIB2_INSTALL_TARGET = YES IMLIB2_DEPENDENCIES = host-pkg-config xlib_libX11 libpng jpeg freetype

$(eval $(call AUTOTARGETS,package,imlib2))

but building fails (at the linking stage apparently) :

...

Quoted 1 line
Quoted 1 line
Quoted 1 line

imlib2 1.4.4 Building

PATH="/home/fred/buildroot/output/host/bin:/home/fred/buildroot/output/host/usr/bin:/home/fred/buildroot/output/host/usr/sbin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games" PERLLIB="/home/fred/buildroot/output/host/usr/lib/perl" /usr/bin/make
-j2 -C /home/fred/buildroot/output/build/imlib2-1.4.4/ make[1]:
entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? /usr/bin/make
all-recursive make[2]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? Making all in src
make[3]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src ? Making all in
lib make[4]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/lib ? make[4]:
Rien ? faire pour ? all ?. make[4]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/lib ? Making all
in bin make[4]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/bin ? CCLD
imlib2_conv CCLD
imlib2_show /home/fred/buildroot/output/host/usr/lib/gcc/i686-unknown-linux-uclibc/4.3.6/../../../../i686-unknown-linux-uclibc/bin/ld:
warning: libc.so.6, needed
by /home/fred/buildroot/output/host/usr/lib/libfreetype.so, not found
(try using -rpath or
-rpath-link) /home/fred/buildroot/output/host/usr/lib/gcc/i686-unknown-linux-uclibc/4.3.6/../../../../i686-unknown-linux-uclibc/bin/ld:
warning: libdl.so.2, needed
by /home/fred/buildroot/output/host/usr/lib/libX11.so, not found (try
using -rpath or
-rpath-link) /home/fred/buildroot/output/host/usr/lib/libfreetype.so:
undefined reference to
`realloc at GLIBC_2.0' /home/fred/buildroot/output/host/usr/lib/libX11.so:
undefined reference to
`pthread_cond_wait at GLIBC_2.3.2' /home/fred/buildroot/output/host/usr/lib/libX11.so:
undefined reference to
`fgets at GLIBC_2.0' /home/fred/buildroot/output/host/usr/lib/libX11.so:
undefined reference to
`inet_pton at GLIBC_2.0' /home/fred/buildroot/output/host/usr/lib/libX11.so:
undefined reference to
`getresuid at GLIBC_2.0' /home/fred/buildroot/output/host/usr/lib/libX11.so:
undefined reference to `pthread_mutex_init at GLIBC_2.0'

...

If a seasoned packager could help :)
Thanks!

#1 lore raw

Hi Frederic,

Quoted 18 lines · Frederic Bassaler

I'm trying to package the imlib2, which I need as a dependency for wbar (a small dock app launcher for X)

here's my imlib2.mk :

#############################################################
#
# IMLIB2
#
#############################################################
IMLIB2_VERSION = 1.4.4
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 IMLIB2_SITE =
http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)/
IMLIB2_INSTALL_STAGING = YES IMLIB2_INSTALL_TARGET = YES IMLIB2_DEPENDENCIES = host-pkg-config xlib_libX11 libpng jpeg freetype

Quoted 2 lines

$(eval $(call AUTOTARGETS,package,imlib2))

I'm no seasoned packager and I'm compiling it without X support, but on a cursory glance I notice some missing dependencies (freetype at least). The packaging may be slightly out of date, but here's my imlib2 makefile which builds and runs with uclibc or eglibc for comparison:

#############################################################
#

# imlib2
#
#############################################################

IMLIB2_MAJOR = 1.4.4
IMLIB2_VERSION = $(IMLIB2_MAJOR)
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.gz IMLIB2_SITE = http://nanobuild/rossbuild/tftpboot/amazon
IMLIB2_INSTALL_STAGING = YES
IMLIB2_AUTORECONF = YES

IMLIB2_CONF_OPT = --program-transform-name='s,,,' \
		--without-x \
		--without-id3

ifeq ($(BR2_PACKAGE_FREETYPE),y)
IMLIB2_CONF_OPT += --with-freetype-config=
$(STAGING_DIR)/usr/bin/freetype-config
IMLIB2_DEPENDENCIES += freetype
else
IMLIB2_CONF_OPT += --without-freetype
endif

ifeq ($(BR2_PACKAGE_JPEG),y)
IMLIB2_CONF_OPT += --with-jpeg
IMLIB2_DEPENDENCIES += jpeg
else
IMLIB2_CONF_OPT += --without-jpeg
endif

ifeq ($(BR2_PACKAGE_LIBPNG),y)
IMLIB2_CONF_OPT += --with-png
IMLIB2_DEPENDENCIES += libpng
else
IMLIB2_CONF_OPT += --without-png
endif

ifeq ($(BR2_PACKAGE_TIFF),y)
IMLIB2_CONF_OPT += --with-tiff
IMLIB2_DEPENDENCIES += tiff
else
IMLIB2_CONF_OPT += --without-tiff
endif

$(eval $(call AUTOTARGETS,package,imlib2))

Quoted 9 lines

...

If a seasoned packager could help :)
Thanks!
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

Hi Matias

Le Thu, 11 Aug 2011 15:31:53 -0400,
Matias Garcia <[email protected]> a ?crit :

Quoted 70 lines

Hi Frederic,

Quoted 19 lines · Frederic Bassaler

I'm trying to package the imlib2, which I need as a dependency for wbar (a small dock app launcher for X)

here's my imlib2.mk :

#############################################################
#
# IMLIB2
#
#############################################################
IMLIB2_VERSION = 1.4.4
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 IMLIB2_SITE =
http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)/
IMLIB2_INSTALL_STAGING = YES IMLIB2_INSTALL_TARGET = YES IMLIB2_DEPENDENCIES = host-pkg-config xlib_libX11 libpng jpeg freetype

Quoted 2 lines

$(eval $(call AUTOTARGETS,package,imlib2))

I'm no seasoned packager and I'm compiling it without X support, but on a cursory glance I notice some missing dependencies (freetype at least). The packaging may be slightly out of date, but here's my imlib2 makefile which builds and runs with uclibc or eglibc for comparison:

#############################################################
#

# imlib2
#
#############################################################

IMLIB2_MAJOR = 1.4.4
IMLIB2_VERSION = $(IMLIB2_MAJOR)
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.gz IMLIB2_SITE = http://nanobuild/rossbuild/tftpboot/amazon
IMLIB2_INSTALL_STAGING = YES
IMLIB2_AUTORECONF = YES

IMLIB2_CONF_OPT = --program-transform-name='s,,,' \
		--without-x \
		--without-id3

ifeq ($(BR2_PACKAGE_FREETYPE),y)
IMLIB2_CONF_OPT += --with-freetype-config=
$(STAGING_DIR)/usr/bin/freetype-config
IMLIB2_DEPENDENCIES += freetype
else
IMLIB2_CONF_OPT += --without-freetype
endif

ifeq ($(BR2_PACKAGE_JPEG),y)
IMLIB2_CONF_OPT += --with-jpeg
IMLIB2_DEPENDENCIES += jpeg
else
IMLIB2_CONF_OPT += --without-jpeg
endif

ifeq ($(BR2_PACKAGE_LIBPNG),y)
IMLIB2_CONF_OPT += --with-png
IMLIB2_DEPENDENCIES += libpng
else
IMLIB2_CONF_OPT += --without-png
endif

Quoted 20 lines

ifeq ($(BR2_PACKAGE_TIFF),y)
IMLIB2_CONF_OPT += --with-tiff
IMLIB2_DEPENDENCIES += tiff
else
IMLIB2_CONF_OPT += --without-tiff
endif

$(eval $(call AUTOTARGETS,package,imlib2))

Quoted 9 lines

...

If a seasoned packager could help :)
Thanks!
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Your .mk file helped a lot!

I adapted it like, this to compile with X :

#############################################################
#
# IMLIB2
#
#############################################################
IMLIB2_VERSION = 1.4.4
IMLIB2_SOURCE = imlib2-$(IMLIB2_VERSION).tar.bz2 IMLIB2_SITE =
http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/project/enlightenment/imlib2-src/$(IMLIB2_VERSION)/
IMLIB2_INSTALL_STAGING = YES IMLIB2_AUTORECONF = YES IMLIB2_DEPENDENCIES = host-pkg-config

ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y)
IMLIB2_CONF_OPT += --with-x
IMLIB2_DEPENDENCIES += xlib_libX11
else
IMLIB2_CONF_OPT += --without-x
endif

ifeq ($(BR2_PACKAGE_FREETYPE),y)
IMLIB2_CONF_OPT += --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config IMLIB2_DEPENDENCIES += freetype else IMLIB2_CONF_OPT += --without-freetype
endif

ifeq ($(BR2_PACKAGE_JPEG),y)
IMLIB2_CONF_OPT += --with-jpeg
IMLIB2_DEPENDENCIES += jpeg
else
IMLIB2_CONF_OPT += --without-jpeg
endif

ifeq ($(BR2_PACKAGE_LIBPNG),y)
IMLIB2_CONF_OPT += --with-png
IMLIB2_DEPENDENCIES += libpng
else
IMLIB2_CONF_OPT += --without-png
endif

ifeq ($(BR2_PACKAGE_TIFF),y)
IMLIB2_CONF_OPT += --with-tiff
IMLIB2_DEPENDENCIES += tiff
else
IMLIB2_CONF_OPT += --without-tiff
endif

$(eval $(call AUTOTARGETS,package,imlib2))

--------------------------------------------------

And it builds further, then there's a different
error :

...
Making all in modules
make[4]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? Making all in loaders make[5]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders ?
CC png_la-loader_png.lo CC jpeg_la-loader_jpeg.lo
loader_png.c: In function 'load':
loader_png.c:61: error: dereferencing pointer to incomplete type loader_png.c: In function 'save':
loader_png.c:268: error: dereferencing pointer to incomplete type loader_png.c:280: error: dereferencing pointer to incomplete type loader_png.c:289: error: dereferencing pointer to incomplete type loader_png.c:300: error: dereferencing pointer to incomplete type make[5]: *** [png_la-loader_png.lo] Erreur 1
make[5]: *** Attente des t?ches non termin?es....
make[5]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders ? make[4]: *** [all-recursive] Erreur 1 make[4]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? make[3]:
*** [all-recursive] Erreur 1 make[3]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src ? make[2]: *** [all-recursive] Erreur 1 make[2]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make[1]: *** [all] Erreur 2 make[1]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make: *** [/home/fred/buildroot/output/build/imlib2-1.4.4/.stamp_built] Erreur 2

Maybe something is still missing?

#3 lore raw

Hi Frederic,

Quoted 11 lines · Frederic Bassaler

Hi Matias

Le Thu, 11 Aug 2011 15:31:53 -0400,
Matias Garcia <[email protected]> a ?crit :

Quoted 6 lines

Hi Frederic,

Quoted 3 lines · Frederic Bassaler

I'm trying to package the imlib2, which I need as a dependency for wbar (a small dock app launcher for X)

<snip>

Quoted 2 lines

Your .mk file helped a lot!

Glad I could help!

<snip>

Quoted 33 lines

And it builds further, then there's a different
error :

...
Making all in modules
make[4]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? Making all in loaders make[5]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders ?
CC png_la-loader_png.lo CC jpeg_la-loader_jpeg.lo
loader_png.c: In function 'load':
loader_png.c:61: error: dereferencing pointer to incomplete type loader_png.c: In function 'save':
loader_png.c:268: error: dereferencing pointer to incomplete type loader_png.c:280: error: dereferencing pointer to incomplete type loader_png.c:289: error: dereferencing pointer to incomplete type loader_png.c:300: error: dereferencing pointer to incomplete type make[5]: *** [png_la-loader_png.lo] Erreur 1
make[5]: *** Attente des t?ches non termin?es....
make[5]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders ? make[4]: *** [all-recursive] Erreur 1 make[4]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? make[3]:
*** [all-recursive] Erreur 1 make[3]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src ? make[2]: *** [all-recursive] Erreur 1 make[2]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make[1]: *** [all] Erreur 2 make[1]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make: *** [/home/fred/buildroot/output/build/imlib2-1.4.4/.stamp_built] Erreur 2

Quoted 1 line

Maybe something is still missing?

Have you looked in loader_png.c? We had to patch that file in 1.4.0, changing a deprecated function:

- png_set_gray_1_2_4_to_8(png_ptr);
+ png_set_expand_gray_1_2_4_to_8(png_ptr);

But it doesn't look like that's your problem. Perhaps you're using a newer libpng? I haven't looked at those lines, so I can't tell.

Matias

#4 lore raw

Le Thu, 11 Aug 2011 16:35:34 -0400,
Matias Garcia <[email protected]> a ?crit :

Quoted 40 lines
Quoted 35 lines

And it builds further, then there's a different
error :

...
Making all in modules
make[4]: entrant dans le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? Making all in loaders make[5]: entrant dans le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders
? CC png_la-loader_png.lo CC jpeg_la-loader_jpeg.lo
loader_png.c: In function 'load':
loader_png.c:61: error: dereferencing pointer to incomplete type loader_png.c: In function 'save':
loader_png.c:268: error: dereferencing pointer to incomplete type loader_png.c:280: error: dereferencing pointer to incomplete type loader_png.c:289: error: dereferencing pointer to incomplete type loader_png.c:300: error: dereferencing pointer to incomplete type make[5]: *** [png_la-loader_png.lo] Erreur 1
make[5]: *** Attente des t?ches non termin?es.... make[5]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules/loaders ? make[4]: *** [all-recursive] Erreur 1 make[4]: quittant le r?pertoire
? /home/fred/buildroot/output/build/imlib2-1.4.4/src/modules ? make[3]: *** [all-recursive] Erreur 1 make[3]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4/src ? make[2]: *** [all-recursive] Erreur 1 make[2]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make[1]: *** [all] Erreur 2 make[1]: quittant le r?pertoire ? /home/fred/buildroot/output/build/imlib2-1.4.4 ? make: *** [/home/fred/buildroot/output/build/imlib2-1.4.4/.stamp_built] Erreur 2

Quoted 1 line

Maybe something is still missing?

Have you looked in loader_png.c? We had to patch that file in 1.4.0, changing a deprecated function:

Review

Quoted 2 lines
(quoted diff) +1 -1
-                png_set_gray_1_2_4_to_8(png_ptr);
+                png_set_expand_gray_1_2_4_to_8(png_ptr);

this appears to have been corrected in imlib2 1.4.4

Quoted 6 lines

But it doesn't look like that's your problem. Perhaps you're using a newer libpng? I haven't looked at those lines, so I can't tell.

Matias

Yes, I had upgraded my libpng to 1.5.4.

Now I have tried with the libpng 1.4.8, and get the same error too :(