Skip to contentSkip to conversation

xterm: x-includes and x-libraries must be set for cross-compiling

PATCH New kyak 4 participants 9 messages Jul 26, 2015 – Jul 27, 2015

lore
Share & tools
lore

kyak

author
#0 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

This fix is similar to "package/efl/libevas: x-includes and x-libraries must be set for cross-compiling" done by Romain Naour on libecore.

---
 package/xterm/Config.in | 1 +
 package/xterm/xterm.mk  | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
package/xterm/Config.in +1 -0
index e17d2c6..f549df4 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_XTERM
 	select BR2_PACKAGE_XLIB_LIBXAW
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_PACKAGE_FREETYPE
 	help
 	  xterm terminal emulator
 
package/xterm/xterm.mk +5 -2
index 56f692d..f7a332d 100644
@@ -10,6 +10,9 @@ XTERM_SITE = ftp://invisible-island.net/xterm
 XTERM_DEPENDENCIES = ncurses xlib_libXaw
 XTERM_LICENSE = MIT
 XTERM_LICENSE_FILES = version.c
-XTERM_CONF_OPTS = --enable-256-color
-
+XTERM_CONF_OPTS = --enable-256-color \
+	--x-includes=$(STAGING_DIR)/usr/include \
+	--x-libraries=$(STAGING_DIR)/usr/lib \
+	--with-freetype-cflags=$(STAGING_DIR)/usr/include \
+	--with-freetype-libs=$(STAGING_DIR)/usr/lib
 $(eval $(autotools-package))
Signature · 1 line
2.4.6
#1 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Mikhail, All,

On 2015-07-26 20:46 +0300, kyak spake thusly:

Quoted 11 lines

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

This fix is similar to "package/efl/libevas: x-includes and x-libraries must be set for cross-compiling" done by Romain Naour on libecore.

The From filed does not match your Signed-off-by; please fix your git config with:

    git config --global user.name 'Mikhail Peselnik'
    git config --global user.email 'bas at bmail.ru'
Quoted 10 lines
---
 package/xterm/Config.in | 1 +
 package/xterm/xterm.mk  | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
package/xterm/Config.in +0 -0
index e17d2c6..f549df4 100644

package/xterm/Config.in config BR2_PACKAGE_XTERM · line 7

Quoted 4 lines
package/xterm/Config.in +1 -0
@@ -4,6 +4,7 @@ config BR2_PACKAGE_XTERM
 	select BR2_PACKAGE_XLIB_LIBXAW
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_PACKAGE_FREETYPE

This should be a 'select' rather than a 'depends on'.

Quoted 8 lines
package/xterm/Config.in +0 -0
 	help
 	  xterm terminal emulator
 
package/xterm/xterm.mk +0 -0
index 56f692d..f7a332d 100644

package/xterm/xterm.mk XTERM_SITE = ftp://invisible-island.net/xterm · line 16

Quoted 9 lines
package/xterm/xterm.mk +4 -2
@@ -10,6 +10,9 @@ XTERM_SITE = ftp://invisible-island.net/xterm
 XTERM_DEPENDENCIES = ncurses xlib_libXaw
 XTERM_LICENSE = MIT
 XTERM_LICENSE_FILES = version.c
-XTERM_CONF_OPTS = --enable-256-color
-
+XTERM_CONF_OPTS = --enable-256-color \
+	--x-includes=$(STAGING_DIR)/usr/include \
+	--x-libraries=$(STAGING_DIR)/usr/lib \
+	--with-freetype-cflags=$(STAGING_DIR)/usr/include \

I guess this should instead be: -I$(STAGING_DIR)/usr/include

package/xterm/xterm.mk XTERM_SITE = ftp://invisible-island.net/xterm · line 17

Quoted 1 line
package/xterm/xterm.mk +1 -0
+	--with-freetype-libs=$(STAGING_DIR)/usr/lib

And this: -L$(STAGING_DIR)/usr/lib

You may also want to add:

    --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config

Regards,
Yann E. MORIN.

Quoted 8 lines
package/xterm/xterm.mk +0 -0
 $(eval $(autotools-package))
Signature · 6 lines
2.4.6

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Hi Mikhail, Yann, All,

Le 26/07/2015 19:59, Yann E. MORIN a ?crit :

Quoted 9 lines

Mikhail, All,

On 2015-07-26 20:46 +0300, kyak spake thusly:

Quoted 6 lines

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

This patch does two things: add x-includes, x-libraries and add freetype2 dependency.
It would be good to split these changes in two different patches.

Quoted 17 lines
Quoted 5 lines

This fix is similar to "package/efl/libevas: x-includes and x-libraries must be set for cross-compiling" done by Romain Naour on libecore.

The From filed does not match your Signed-off-by; please fix your git config with:

    git config --global user.name 'Mikhail Peselnik'
    git config --global user.email 'bas at bmail.ru'
Quoted 5 lines
---
 package/xterm/Config.in | 1 +
 package/xterm/xterm.mk  | 7 +++++--
 2 files changed, 6 insertions(+), 2 deletions(-)
Quoted 11 lines

package/xterm/Config.in config BR2_PACKAGE_XTERM · line 7

Quoted 9 lines
package/xterm/Config.in +1 -0
index e17d2c6..f549df4 100644
@@ -4,6 +4,7 @@ config BR2_PACKAGE_XTERM
 	select BR2_PACKAGE_XLIB_LIBXAW
 	depends on BR2_PACKAGE_XORG7
 	depends on BR2_USE_MMU # fork()
+	depends on BR2_PACKAGE_FREETYPE

This should be a 'select' rather than a 'depends on'.

In not sure about select. There is a --disable-freetype option, see below.

Quoted 21 lines
Quoted 9 lines
package/xterm/Config.in +0 -0
 	help
 	  xterm terminal emulator
 
package/xterm/xterm.mk +0 -0
index 56f692d..f7a332d 100644

package/xterm/xterm.mk XTERM_SITE = ftp://invisible-island.net/xterm · line 16

Quoted 9 lines
package/xterm/xterm.mk +4 -2
@@ -10,6 +10,9 @@ XTERM_SITE = ftp://invisible-island.net/xterm
 XTERM_DEPENDENCIES = ncurses xlib_libXaw
 XTERM_LICENSE = MIT
 XTERM_LICENSE_FILES = version.c
-XTERM_CONF_OPTS = --enable-256-color
-
+XTERM_CONF_OPTS = --enable-256-color \
+	--x-includes=$(STAGING_DIR)/usr/include \
+	--x-libraries=$(STAGING_DIR)/usr/lib \
+	--with-freetype-cflags=$(STAGING_DIR)/usr/include \

I guess this should instead be: -I$(STAGING_DIR)/usr/include

Quoted 7 lines

package/xterm/xterm.mk XTERM_SITE = ftp://invisible-island.net/xterm · line 17

Quoted 1 line
package/xterm/xterm.mk +1 -0
+	--with-freetype-libs=$(STAGING_DIR)/usr/lib

And this: -L$(STAGING_DIR)/usr/lib

You may also want to add:

    --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config

Maybe something like this (untested):

ifeq ($(BR2_PACKAGE_FREETYPE),y)

XTERM_CONF_OPTS += --with-freetype-config="$(STAGING_DIR)/usr/bin/freetype-config" \
                   --with-freetype-cflags="-I$(STAGING_DIR)/usr/include" \
                   --with-freetype-libs="-L$(STAGING_DIR)/usr/lib"

else
XTERM_CONF_OPTS += --disable-freetype
endif

But it you think that freetype must always be selected, this is ok.

Thoughts ?

Best regards,
Romain Naour

Quoted 13 lines

Regards,
Yann E. MORIN.

Quoted 8 lines
package/xterm/xterm.mk +0 -0
 $(eval $(autotools-package))
Signature · 6 lines
2.4.6

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
#3 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

In reply to Yann E. MORIN

Yann,

Quoted 11 lines · Yann E. MORIN

On 2015-07-26 20:46 +0300, kyak spake thusly:

Quoted 10 lines

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

This fix is similar to "package/efl/libevas: x-includes and x-libraries must be set for cross-compiling" done by Romain Naour on libecore.

Quoted 7 lines
Quoted 1 line

The From filed does not match your Signed-off-by; please fix your git config with:

    git config --global user.name 'Mikhail Peselnik'
    git config --global user.email 'bas at bmail.ru'

Are you sure?

In the patch itself, I see:

From: Mikhail Peselnik <[email protected]>

which does match. However, it indeed doesn't match the From of the mail itself:

From: kyak <[email protected]>

Which I'm not sure is related to the Git configuration. And while it's a bit ugly, I think it doesn't cause any problem because Git will use the From: from inside the patch itself in preference over the From: of the e-mail.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Thomas, All,

On 2015-07-26 21:44 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines · Yann E. MORIN
Quoted 7 lines

On 2015-07-26 20:46 +0300, kyak spake thusly:

Quoted 1 line

From: Mikhail Peselnik <[email protected]>

The From filed does not match your Signed-off-by; please fix your git config with:

    git config --global user.name 'Mikhail Peselnik'
    git config --global user.email 'bas at bmail.ru'
Quoted 6 lines

Are you sure?

In the patch itself, I see:

From: Mikhail Peselnik <[email protected]>

Ah, right. Then it would be:

    git conmfig --global sendemail.from 'Mikhail Peselnik <[email protected]>'
Quoted 9 lines

which does match. However, it indeed doesn't match the From of the mail itself:

From: kyak <[email protected]>

Which I'm not sure is related to the Git configuration. And while it's a bit ugly, I think it doesn't cause any problem because Git will use the From: from inside the patch itself in preference over the From: of the e-mail.

Indeed, forget what I said. I was just a bit surprised that the From field in the mail headers did not match the SoB line; but since there's a From field in the patch itself, all is good wrt. git keeping authorship.

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

In reply to kyak

Hello,

Quoted 6 lines · kyak

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

So it should be two patches.

Basically, if your patch does something that isn't summarized in the commit title, then probably something wrong is going on.

So, one patch for x-includes/x-libraries, one patch for the missing freetype2 dependency.

However, I believe Romain was maybe wrong: the freetype dependency seems to be optional, according to configure.in. So it should probably just be:

ifeq ($(BR2_PACKAGE_FREETYPE),y)
XTERM_DEPENDENCIES += freetype
XTERM_CONF_OPTS += --enable-freetype
else
XTERM_CONF_OPTS += --disable-freetype
endif

Romain, can you confirm?

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Thomas,

Le 26/07/2015 21:47, Thomas Petazzoni a ?crit :

Quoted 22 lines

Hello,

Quoted 6 lines · kyak

From: Mikhail Peselnik <[email protected]>

These flags need to be set so that the configure script would correctly use libICE from cross-toolchain rather than from host. Also, the xterm package is missing the freetype2 dependency, as noted by Romain Naour.

So it should be two patches.

Basically, if your patch does something that isn't summarized in the commit title, then probably something wrong is going on.

So, one patch for x-includes/x-libraries, one patch for the missing freetype2 dependency.

However, I believe Romain was maybe wrong: the freetype dependency seems to be optional, according to configure.in. So it should probably just be:

Quoted 8 lines

ifeq ($(BR2_PACKAGE_FREETYPE),y)
XTERM_DEPENDENCIES += freetype
XTERM_CONF_OPTS += --enable-freetype
else
XTERM_CONF_OPTS += --disable-freetype
endif

Romain, can you confirm?

I don't know much the xterm package but indeed the freetype support seems optional. However, it depends on libXft.

So I made this change:

# freetype support needs libXft, so enable it only when
# libxft package is selected.
# Note: freetype is automatically selected by libXft.
ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y)
XTERM_DEPENDENCIES += freetype xlib_libXft
XTERM_CONF_OPTS += --enable-freetype \
	--with-freetype-cflags="-I$(STAGING_DIR)/usr/include/freetype2" \
	--with-freetype-libs="-L$(STAGING_DIR)/usr/lib"
else
XTERM_CONF_OPTS += --disable-freetype
endif

It doesn't work when freetype-config is used directly with:
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config

Mikhail, can you resend an updated version with this change?

Best regards,
Romain

Quoted 5 lines

Best regards,

Thomas

#7 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Romain,

Quoted 2 lines · Romain Naour

I don't know much the xterm package but indeed the freetype support seems optional. However, it depends on libXft.

No, I think it's not the way it works. What xterm calls "freetype" is *not* freetype, it's libXft, i.e X Freetype. If you look at the definition of CF_X_FREETYPE, it searches for xft, and never for freetype.

Quoted 3 lines
# freetype support needs libXft, so enable it only when
# libxft package is selected.
# Note: freetype is automatically selected by libXft.

Don't add this comment.

Quoted 2 lines

ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y)
XTERM_DEPENDENCIES += freetype xlib_libXft

Don't add the freetype dependency here.

Quoted 3 lines
XTERM_CONF_OPTS += --enable-freetype \
	--with-freetype-cflags="-I$(STAGING_DIR)/usr/include/freetype2" \
	--with-freetype-libs="-L$(STAGING_DIR)/usr/lib"

I think these are wrong. Instead, do:

--with-freetype-config=auto

It will use pkg-config to find libXft. Of course, make sure host-pkgconf is in the dependencies.

Quoted 2 lines

It doesn't work when freetype-config is used directly with:
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config

Yes, because it's not looking for freetype, but Xft.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#8 lore raw

PATCH v2 1/1 xterm: x-includes and x-libraries must be set for cross-compiling

Hi Thomas,

Le 26/07/2015 23:25, Thomas Petazzoni a ?crit :

Quoted 11 lines

Romain,

Quoted 2 lines · Romain Naour

I don't know much the xterm package but indeed the freetype support seems optional. However, it depends on libXft.

No, I think it's not the way it works. What xterm calls "freetype" is *not* freetype, it's libXft, i.e X Freetype. If you look at the definition of CF_X_FREETYPE, it searches for xft, and never for freetype.

Thanks for the explanation, I was completely confused between (the real) freetype and libXft...
Let me (or Mikhail) look again at the issue ;-)

Best regards,
Romain

Quoted 32 lines
Quoted 4 lines
# freetype support needs libXft, so enable it only when
# libxft package is selected.
# Note: freetype is automatically selected by libXft.

Don't add this comment.

Quoted 2 lines

ifeq ($(BR2_PACKAGE_XLIB_LIBXFT),y)
XTERM_DEPENDENCIES += freetype xlib_libXft

Don't add the freetype dependency here.

Quoted 3 lines
XTERM_CONF_OPTS += --enable-freetype \
	--with-freetype-cflags="-I$(STAGING_DIR)/usr/include/freetype2" \
	--with-freetype-libs="-L$(STAGING_DIR)/usr/lib"

I think these are wrong. Instead, do:

--with-freetype-config=auto

It will use pkg-config to find libXft. Of course, make sure host-pkgconf is in the dependencies.

Quoted 2 lines

It doesn't work when freetype-config is used directly with:
--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config

Yes, because it's not looking for freetype, but Xft.

Best regards,

Thomas