mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] build failure in xterm
@ 2014-06-13 15:12 Richard Cochran
  2014-06-13 15:20 ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Cochran @ 2014-06-13 15:12 UTC (permalink / raw)
  To: ptxdist

Dear list,

Using the latest git ptxdist, building xterm fails like this.

---------------------
target: xterm.compile
---------------------
...
/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.7.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld: main.o: undefined reference to symbol 'IceSetIOErrorHandler'
/opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.7.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld: note: 'IceSetIOErrorHandler' is defined in DSO /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6 so try adding it to the linker command line
/home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status

The library seems to be okay:

file /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6.3.0 
/home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6.3.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped

Any ideas?

Thanks,
Richard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] build failure in xterm
  2014-06-13 15:12 [ptxdist] build failure in xterm Richard Cochran
@ 2014-06-13 15:20 ` Michael Olbrich
  2014-06-13 18:11   ` Richard Cochran
  2014-06-13 18:25   ` Richard Cochran
  0 siblings, 2 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-06-13 15:20 UTC (permalink / raw)
  To: ptxdist

Hi,

On Fri, Jun 13, 2014 at 05:12:44PM +0200, Richard Cochran wrote:
> Using the latest git ptxdist, building xterm fails like this.
> 
> ---------------------
> target: xterm.compile
> ---------------------
> ...
> /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.7.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld: main.o: undefined reference to symbol 'IceSetIOErrorHandler'
> /opt/OSELAS.Toolchain-2012.12.1/arm-cortexa9-linux-gnueabihf/gcc-4.7.3-glibc-2.16.0-binutils-2.22-kernel-3.6-sanitized/bin/../lib/gcc/arm-cortexa9-linux-gnueabihf/4.7.3/../../../../arm-cortexa9-linux-gnueabihf/bin/ld: note: 'IceSetIOErrorHandler' is defined in DSO /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6 so try adding it to the linker command line
> /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6: could not read symbols: Invalid operation
> collect2: error: ld returned 1 exit status
> 
> The library seems to be okay:
> 
> file /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6.3.0 
> /home/richard/git/DistroKit/platform-pengutronix-beagleboneti/sysroot-target/usr/lib/libICE.so.6.3.0: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
> 
> Any ideas?

Try:

PTXCONF_TARGET_EXTRA_LDFLAGS="-Wl,--copy-dt-needed-entries"

In the platformconfig.

Michael

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] build failure in xterm
  2014-06-13 15:20 ` Michael Olbrich
@ 2014-06-13 18:11   ` Richard Cochran
  2014-06-13 18:25   ` Richard Cochran
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Cochran @ 2014-06-13 18:11 UTC (permalink / raw)
  To: ptxdist

On Fri, Jun 13, 2014 at 05:20:01PM +0200, Michael Olbrich wrote:
> Try:
> 
> PTXCONF_TARGET_EXTRA_LDFLAGS="-Wl,--copy-dt-needed-entries"
> 
> In the platformconfig.

That does fix the build, but I think it isn't the right way. This is
not a problem with the tool chain. Rather, it is really a bug in the
xterm build scripts, strictly speaking. [1]

So I think the best way would be to patch the xterm package itself.
Failing that, then the ldflag, being a work around, should go into
rules/xterm.make.

Do you agree?

Thanks,
Richard

1. http://fedoraproject.org/wiki/UnderstandingDSOLinkChange

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] build failure in xterm
  2014-06-13 15:20 ` Michael Olbrich
  2014-06-13 18:11   ` Richard Cochran
@ 2014-06-13 18:25   ` Richard Cochran
  2014-06-13 20:29     ` [ptxdist] [PATCH] xterm: fix the build Richard Cochran
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Cochran @ 2014-06-13 18:25 UTC (permalink / raw)
  To: ptxdist

On Fri, Jun 13, 2014 at 05:20:01PM +0200, Michael Olbrich wrote:
> Try:
> 
> PTXCONF_TARGET_EXTRA_LDFLAGS="-Wl,--copy-dt-needed-entries"
> 
> In the platformconfig.

Some time ago you wrote:

   http://thread.gmane.org/gmane.comp.embedded.ptxdist.devel/10780/focus=10781

Isn't that the better way?

Thanks,
Richard

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [ptxdist] [PATCH] xterm: fix the build
  2014-06-13 18:25   ` Richard Cochran
@ 2014-06-13 20:29     ` Richard Cochran
  2014-06-16 19:00       ` Michael Olbrich
  0 siblings, 1 reply; 6+ messages in thread
From: Richard Cochran @ 2014-06-13 20:29 UTC (permalink / raw)
  To: ptxdist


Due to the change in the way that gcc is resolving the DSO linking,
shared libraries must now be named explicitly. As a result, the configure
script in the xterm package does not find libICE as it should. This patch
works around the problem by adding that library manually.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
---
 rules/xterm.make |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/xterm.make b/rules/xterm.make
index 523bc14..4797830 100644
--- a/rules/xterm.make
+++ b/rules/xterm.make
@@ -46,6 +46,8 @@ XTERM_AUTOCONF := \
 # pkg-config then.
 #
 
+XTERM_MAKE_OPT := EXTRA_LOADFLAGS=-lICE
+
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [ptxdist] [PATCH] xterm: fix the build
  2014-06-13 20:29     ` [ptxdist] [PATCH] xterm: fix the build Richard Cochran
@ 2014-06-16 19:00       ` Michael Olbrich
  0 siblings, 0 replies; 6+ messages in thread
From: Michael Olbrich @ 2014-06-16 19:00 UTC (permalink / raw)
  To: ptxdist

On Fri, Jun 13, 2014 at 10:29:45PM +0200, Richard Cochran wrote:
> 
> Due to the change in the way that gcc is resolving the DSO linking,
> shared libraries must now be named explicitly. As a result, the configure
> script in the xterm package does not find libICE as it should. This patch
> works around the problem by adding that library manually.
> 
> Signed-off-by: Richard Cochran <richardcochran@gmail.com>

Thanks, applied.

Michael

> ---
>  rules/xterm.make |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/rules/xterm.make b/rules/xterm.make
> index 523bc14..4797830 100644
> --- a/rules/xterm.make
> +++ b/rules/xterm.make
> @@ -46,6 +46,8 @@ XTERM_AUTOCONF := \
>  # pkg-config then.
>  #
>  
> +XTERM_MAKE_OPT := EXTRA_LOADFLAGS=-lICE
> +
>  # ----------------------------------------------------------------------------
>  # Target-Install
>  # ----------------------------------------------------------------------------
> -- 
> 1.7.10.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-06-16 19:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-13 15:12 [ptxdist] build failure in xterm Richard Cochran
2014-06-13 15:20 ` Michael Olbrich
2014-06-13 18:11   ` Richard Cochran
2014-06-13 18:25   ` Richard Cochran
2014-06-13 20:29     ` [ptxdist] [PATCH] xterm: fix the build Richard Cochran
2014-06-16 19:00       ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox