Bug 540921

Summary: emacs FTBFS on F12
Product: [Fedora] Fedora Reporter: Praveen Arimbrathodiyil <parimbra>
Component: emacsAssignee: Daniel Novotny <dnovotny>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: debarshir, dnovotny, jakub, jan.h.d, jonathan.underwood, llim, pnemade, psatpute, tagoh
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 23.1-12.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-02 04:29:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
configure.in patch none

Description Praveen Arimbrathodiyil 2009-11-24 14:23:25 UTC
Description of problem:

emacs fails to build from source
Version-Release number of selected component (if applicable):


How reproducible:
always

Steps to Reproduce:
1. yumdownloader --source emacs
2. rpmbuild --rebuild emacs*.rpm
3.
  
Actual results:

config.status: executing default commands
creating src/epaths.h
creating lib-src/Makefile
creating src/Makefile
+ /usr/bin/make bootstrap
(cd src;      /usr/bin/make  bootstrap-clean)
make[1]: Entering directory `/home/pravi/rpmbuild/BUILD/emacs-23.1/src'
Makefile:103: *** commands commence before first target.  Stop.
make[1]: Leaving directory `/home/pravi/rpmbuild/BUILD/emacs-23.1/src'
make: *** [bootstrap-clean] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7mXN5P (%build)


Expected results:

emacs re-built without problems

Additional info:

Comment 1 Pravin Satpute 2009-11-25 11:38:59 UTC
its strange, it is failing in koji as well whicle scratch build
see build log http://koji.fedoraproject.org/koji/getfile?taskID=1829990&name=build.log

what is the problem?

Comment 2 Praveen Arimbrathodiyil 2009-11-25 13:24:56 UTC
the issue is not using newline escape character ('\') when multiline values are assigned to variables

Comment 3 Praveen Arimbrathodiyil 2009-11-26 15:44:34 UTC
submitted upstream http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=5047

Comment 4 Akira TAGOH 2009-11-30 08:59:29 UTC
Just for the simple testcases:

1) cpp --version
2) /bin/echo -e 'obj=    foo \\\n\tbar \\\n\tbaz\n' | cpp

on F-11:
1)
cpp (GCC) 4.4.1 20090725 (Red Hat 4.4.1-2)

2)
obj= foo bar baz

on F-12:
1)
cpp (GCC) 4.4.2 20091027 (Red Hat 4.4.2-7)

2)
obj= foo
 bar
 baz


This result explains why it didn't happen on F-11 but on F-12 or later. it looks like cpp issue to me because it's used to pre-process something. cpp shouldn't expect any parsers can read it with/without the backslash at the end of line. IMHO it would be better keep it as is.

Comment 5 Daniel Novotny 2009-11-30 09:37:14 UTC
the backslashes shouldn't be lost
reassigning to cpp, i.e. gcc package

Comment 6 Jan D. 2009-11-30 10:45:38 UTC
FWIW, this is fixed in later Emacs versions (unreleased CVS version):

2009-10-23  Jim Meyering  <meyering>

        * configure.in: Invoke $CPP with -P when creating Makefile and
        src/Makefile.  Without this, gcc 4.4.2 converts each
        backslash-newline pair in the input to a bare newline, yielding
        invalid Makefiles.


Watch:

% cpp --version
cpp (GCC) 4.4.2 20091027 (Red Hat 4.4.2-7)
% /bin/echo -e 'obj=    foo \\\n\tbar \\\n\tbaz\n' | cpp
obj= foo bar baz

Comment 7 Daniel Novotny 2009-11-30 10:52:56 UTC
OK, I'll reassign this to myself and backport the change

Comment 8 Daniel Novotny 2009-11-30 13:00:32 UTC
Created attachment 374742 [details]
configure.in patch

you also have to run "autoconf" in %build section of the spec to regenerate "configure"

Comment 9 Parag Nemade 2009-11-30 13:04:52 UTC
Thanks all for their work. Its nice that we have found solution. Can we have this backported to F-12 as well and have a new koji build release?

It took me some time to find actually what commit was happened in git but I got it here  -> http://github.com/davidswelt/aquamacs-emacs/commit/7ffa22b0da2005b1ad04f9884dd154de2821e8d7

Comment 10 Daniel Novotny 2009-11-30 13:26:32 UTC
(In reply to comment #9)
> Thanks all for their work. Its nice that we have found solution. Can we have
> this backported to F-12 as well and have a new koji build release?
yes, we will build new F12 and F13 release
rawhide(F-13) build is now finished (emacs-23.1-14.fc13), F12 update will follow

Comment 11 Fedora Update System 2009-11-30 13:48:13 UTC
emacs-23.1-12.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/emacs-23.1-12.fc12

Comment 12 Fedora Update System 2009-12-02 04:29:42 UTC
emacs-23.1-12.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.