Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 864314 - gcc-python-plugin is FTBFS on ARM
Summary: gcc-python-plugin is FTBFS on ARM
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc-python-plugin
Version: 19
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: ARMTracker
TreeView+ depends on / blocked
 
Reported: 2012-10-09 06:16 UTC by Peter Robinson
Modified: 2013-10-06 20:50 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-06 20:50:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Peter Robinson 2012-10-09 06:16:27 UTC
It fails to build on ARM, looks to be some definitions missing.

http://arm.koji.fedoraproject.org/koji/packageinfo?packageID=11939

Latest: http://arm.koji.fedoraproject.org/koji/buildinfo?buildID=96570

cc -I/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include -fPIC -fno-strict-aliasing -O2 -Wall -Werror -g -I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -D_GNU_SOURCE -fPIC -fwrapv -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/python2"'   -c -o gcc-python.o gcc-python.c
In file included from gcc-python.c:21:0:
gcc-python.h:24:34: fatal error: autogenerated-config.h: No such file or directory
compilation terminated.
locating plugin directory for gcc... /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin
checking for gcc-plugin.h... found
checking whether plugin.def defines PLUGIN_FINISH_DECL... yes
writing autogenerated-config.h
cc -I/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include -fPIC -fno-strict-aliasing -O2 -Wall -Werror -g -I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard -D_GNU_SOURCE -fPIC -fwrapv -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic -DPLUGIN_PYTHONPATH='"/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/python2"'   -c -o gcc-python-attribute.o gcc-python-attribute.c
In file included from /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include/options.h:8:0,
                 from /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include/flags.h:27,
                 from /usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include/tree.h:35,
                 from gcc-python.h:25,
                 from gcc-python-attribute.c:21:
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include/config/arm/arm-opts.h:30:25: fatal error: arm-cores.def: No such file or directory
compilation terminated.
make: *** [gcc-python.o] Error 1

Comment 1 Dave Malcolm 2012-10-09 15:11:29 UTC
gcc-python-plugin's build is passing:
  -I/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include

This looks like a gcc packaging bug: if tree.h includes arm-opts.h and the latter includes arm-cores.def, then presumably that .def file should also be packaged?

Reassigning to "gcc" (though perhaps there's an extra path that the plugin should be adding to the include path with "-I" ?)

Comment 2 Dave Malcolm 2012-10-09 15:13:30 UTC
FWIW, the Makefile has:

   GCCPLUGINS_DIR:= $(shell $(CC) --print-file-name=plugin)

which is used to add this to the CPPFLAGS:

  -I$(GCCPLUGINS_DIR)/include -I$(GCCPLUGINS_DIR)/include/c-family

Comment 3 Fedora End Of Life 2013-04-03 15:06:02 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle.
Changing version to '19'.

(As we did not run this process for some time, it could affect also pre-Fedora 19 development
cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.)

More information and reason for this action is here:
https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19

Comment 4 Peter Robinson 2013-04-29 13:45:00 UTC
> This looks like a gcc packaging bug: if tree.h includes arm-opts.h and the
> latter includes arm-cores.def, then presumably that .def file should also be
> packaged?

Looks like this issue is fixed now and the core build/install now completes but we're failing a bunch of tests:

276 successes; 14 failures; 0 skipped
Failed tests:
  tests/cpychecker/absinterp/array-range/fully-checked
  tests/cpychecker/absinterp/array-range/fully-checked-on-stack
  tests/cpychecker/absinterp/array-range/implicitly-correct
  tests/cpychecker/absinterp/array-range/off-by-one
  tests/cpychecker/absinterp/array-range/unchecked
  tests/cpychecker/absinterp/array-range/upper-checked
  tests/cpychecker/absinterp/bitfields/reading
  tests/cpychecker/absinterp/casts/int-to-char-with-extraction
  tests/cpychecker/absinterp/casts/int-to-char-with-implicit-truncation
  tests/cpychecker/absinterp/custom-strdup
  tests/cpychecker/refcounts/PyArg_UnpackTuple/missing-initialization
  tests/plugin/gc/_force_garbage_collection
  tests/plugin/gc/_gc_selftest
  tests/plugin/gc/segfault-on-instance-of-pass-subclass

Full output here: http://arm.koji.fedoraproject.org/koji/taskinfo?taskID=1756195

let me know if you need more information.

Comment 5 Dave Malcolm 2013-04-29 15:35:59 UTC
Thanks.  Looking through the logs:

  tests/cpychecker/absinterp/array-range/fully-checked
  tests/cpychecker/absinterp/array-range/fully-checked-on-stack
  tests/cpychecker/absinterp/array-range/implicitly-correct
  tests/cpychecker/absinterp/array-range/off-by-one
  tests/cpychecker/absinterp/array-range/unchecked
  tests/cpychecker/absinterp/array-range/upper-checked
  tests/cpychecker/absinterp/casts/int-to-char-with-implicit-truncation
  tests/cpychecker/absinterp/custom-strdup
    these all seem to be a signedness of char issue (the tests seem to be expecting signed char, the results seem to be using unsigned char)

  tests/cpychecker/absinterp/bitfields/reading
  tests/cpychecker/absinterp/casts/int-to-char-with-extraction
    not yet sure about these ones
    
  tests/cpychecker/refcounts/PyArg_UnpackTuple/missing-initialization
    small (benign) change in labelling temprorary value

  tests/plugin/gc/_force_garbage_collection
  tests/plugin/gc/_gc_selftest
  tests/plugin/gc/segfault-on-instance-of-pass-subclass
    all three of these segfault

I'm provisioning a machine to investigate further.

Comment 6 Jakub Jelinek 2013-04-29 15:39:03 UTC
If it is about test output, you might just compile with -fsigned-char.

Comment 7 Dave Malcolm 2013-04-29 17:10:13 UTC
FWIW comment #4 was built against 4.8.0-2.fc19

I'm still seeing:

/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/4.7.2/plugin/include/config/arm/arm-opts.h:30:25: fatal error: arm-cores.def: No such file or directory

with:
  gcc-4.7.2-8.fc18.armv7hl
  gcc-plugin-devel-4.7.2-8.fc18.armv7hl

[This was separately filed as bug 910926 and looking at git logs it looks like you fixed this in 

* Thu Mar  7 2013 Jakub Jelinek <jakub> 4.8.0-0.16
[..snip..]
  - include arm-cores.def in gcc-python-plugin on arm (#910926)
[..snip..]

but not in the F18 branch.

For reference, the upstream file is here:
http://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/arm/arm-cores.def?view=markup

I manually copied it into place.

I also had to manually copy config/vxworks-dummy.h into place

With that, I'm seeing the same failures with gcc-4.7.2-8.fc18.armv7hl (although tests/cpychecker/absinterp/bitfields/reading is actually passing for me).

Comment 9 Dave Malcolm 2013-04-29 19:17:27 UTC
(In reply to comment #6)
> If it is about test output, you might just compile with -fsigned-char.

Good idea; thanks.

Implemented in:
https://git.fedorahosted.org/cgit/gcc-python-plugin.git/commit/?id=2f208bbd41d8ec6f1988f8b66fbdfc48175543b8

which together with the ggc root_tab fix brings the failures on this box down to just:

290 successes; 4 failures; 0 skipped
Failed tests:
  tests/cpychecker/absinterp/array-range/fully-checked-on-stack
  tests/cpychecker/refcounts/PyArg_UnpackTuple/missing-initialization
  tests/cpychecker/refcounts/cplusplus/destructor
  tests/cpychecker/refcounts/cplusplus/empty-function

Comment 10 Peter Robinson 2013-05-30 21:48:45 UTC
David what's the status of getting the 4 final failures closed out?


Note You need to log in before you can comment on or make changes to this bug.