Hi Samuel,

Do you plan uploading the NMU change?
There are two other RC bugs which are fixed upstream and including the
fixes for them, too, would unblock Emacs 24's migration to testing,
which would be great.

Cheers,
Balint

On 07/28/2013 01:13 AM, Samuel Bronson wrote:
> Control: tags -1 + patch
> 
> Kevin Ryde <use...@zip.com.au> writes:
> 
>> I suspect this may have to do with -Wl,-znocombreloc.  If I change the
>> debian/rules to
>>
>>     LDFLAGS = $(shell dpkg-buildflags --get LDFLAGS) -Wl,-znocombreloc
>>
>> then the emacs24-lucid package works.
>>
>> The emacs configure checks for and adds -Wl,-znocombreloc to LDFLAGS.
>> But the way the "build_cmd" forces
>>
>>     $(MAKE) LDFLAGS=...
>>
>> loses that configure -Wl from the actual compile.  Perhaps either
>> build_cmd could not force the flags on the make, but only on the
>> configure invocation, or else ensure -Wl,-znocombreloc is included in
>> the overridden flags.  It seems configure uses -Wl,-znocombreloc
>> whenever it works, which for debian would mean always I expect.
> 
> Well spotted.  I've patched debian/rules to pass the LDFLAGS to
> configure instead of to make (and to stop passing CFLAGS and CPPFLAGS to
> make since we already pass them to configure) and it seems to work fine.
> 
>> Dunno what -Wl,-znocombreloc actually does.  Something hairy affecting
>> unexec I suppose.  Dunno why it only affects the athena build.  The
>> relocations which are broken without it are related to structs copied
>> from the shared library into the program data area.  Perhaps the gtk
>> build doesn't have any of those.
> 
> Well, -zcombreloc (presumably the opposite of -znocombreloc) is
> documented thus:
> 
>      'combreloc'
>           Combines multiple reloc sections and sorts them to make
>           dynamic symbol lookup caching possible.
> 
> As to why this is only problematic with the lucid build, and what
> exactly the problem is: only the lucid build has a .rel.data section,
> and that looks something like this:
> 
> Relocation section '.rel.data' at offset 0x7118 contains 2 entries:
>  Offset     Info    Type                Sym. Value  Symbol's Name
> 08405e60  0000e201 R_386_32               00000000   widgetClassRec
> 08405c20  0000e201 R_386_32               00000000   widgetClassRec
> 
> GDB tells me thes\e references are from xlwMenuClassRec and
> emacsFrameClassRec. Seeing as Xt is crashing (recursively) after we pass
> it a pointer to the latter, it seems that unexelf.c is just failing to
> unrelocate these two pointers, so that it tries to read from a totally
> garbage address ...
> 
> This appears to happen because unexelf.c expects each relocation section
> to apply to only one other section, the index of which it expects as
> sh_info for the relocation section.
> 
> Probably the "right" way to handle this would be for unexelf.c to just
> go through all of the relocations and filter by address ...
> 
> 
> 
> diff -Nru emacs24-24.3+1/debian/changelog emacs24-24.3+1/debian/changelog
> --- emacs24-24.3+1/debian/changelog   2013-06-25 21:31:35.000000000 +0000
> +++ emacs24-24.3+1/debian/changelog   2013-07-27 20:13:49.000000000 +0000
> @@ -1,3 +1,13 @@
> +emacs24 (24.3+1-1.2) UNRELEASED; urgency=low
> +
> +  * Non-maintainer upload.
> +  * Don't override CFLAGS, CPPFLAGS, and LDFLAGS chosen by upstream
> +    configure script.  A missing -Wl,-znocombreloc was causing 32-bit
> +    builds of emacs24-lucid to fail under X. (Closes: #684788)
> +  * Make clean target remove src/stamp-h.in so multiple builds work.
> +
> + -- Samuel Bronson <naes...@gmail.com>  Sat, 27 Jul 2013 17:16:35 +0000
> +
>  emacs24 (24.3+1-1.1) unstable; urgency=low
>  
>    * Non-maintainer upload.
> diff -Nru emacs24-24.3+1/debian/rules emacs24-24.3+1/debian/rules
> --- emacs24-24.3+1/debian/rules       2013-06-25 21:30:35.000000000 +0000
> +++ emacs24-24.3+1/debian/rules       2013-07-27 20:12:28.000000000 +0000
> @@ -342,13 +342,13 @@
>    rm -rf $(1)
>    mkdir $(1)
>    cp -a $$(ls -A | egrep -v '^(\.git|\.pc|debian)$$') "$(1)"
> -  cd $(1) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" ./configure 
> $(confflags) $(2)
> +  cd $(1) && CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS)" 
> ./configure $(confflags) $(2)
>  endef
>  
>  define build_cmd
> -  $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" 
> LDFLAGS="$(LDFLAGS)"
> +  $(MAKE) -C $(1) -j $(joblimit)
>    # If we don't use bootstrap, we need to explicitly build info.
> -  $(MAKE) -C $(1) -j $(joblimit) CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" 
> LDFLAGS="$(LDFLAGS)" info
> +  $(MAKE) -C $(1) -j $(joblimit) info
>    # Make sure we chose liblockfile.
>    ldd $(1)/lib-src/movemail | grep liblockfile
>  endef
> @@ -632,6 +632,6 @@
>         debian/install-x \
>         lib/Makefile.in \
>         src/config.in \
> -       src/stamp-h1
> +       src/stamp-h1 src/stamp-h.in
>       rm -f $(nonpersistent_autogen_files)
>       dh_clean
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to