Experimental Physics and Industrial Control System
Subject: |
Problems building EPICS base3.14.12.4 for i386 and armhf |
From: |
Florian Feldbauer <[email protected]> |
To: |
EPICS Tech Talk <[email protected]> |
Date: |
Wed, 07 Jan 2015 10:30:16 +0100 |
Hey all,
for the PANDA experiment (which is still in development/prototyping phase)
we wanted to create Debian packages to simplify the maintainability of
our current EPICS installations.
I oriented myself by the Debian packages from Michael Davidsaver and
added these compiler flags in my debian rules file for the build process:
DEB_USR_CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS)
DEB_USR_CFLAGS:=$(shell dpkg-buildflags --get CFLAGS)
DEB_USR_CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
DEB_USR_LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
The packages should be build for the architectures amd64, i386 and armhf.
For amd64 everything works smoothly. But for the other two I got lots of
warnings
when compiling Cap5.c from base3.14.12.4 (see log below)
Additionally the above compiler flags include "-Werror=format-security"
which causes the compilation of Cap5.c to fail with an error.
Is there a way to fix this problem without removing the compiler flags?
Best regards
Florian
perl /usr/bin/xsubpp -typemap /usr/share/perl/5.14/ExtUtils/typemap
../Cap5.xs > Cap5.c_new && mv Cap5.c_new Cap5.c
/usr/bin/gcc -c -D_FORTIFY_SOURCE=2 -D_POSIX_C_SOURCE=199506L
-D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_FORTIFY_SOURCE=2
-D_X86_ -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -O3 -g -Wall
-D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector
-fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -fstack-protector --param=ssp-buffer-size=4
-Wformat -Werror=format-security -m32 -fPIC -MMD -I. -I../O.Common
-I. -I..
-I/home/florian/dpack/tmp/epics-base-3.14.12.4/debian/epics-base/include/os/Linux
-I/home/florian/dpack/tmp/epics-base-3.14.12.4/debian/epics-base/include
-I/usr/lib/perl/5.14/CORE Cap5.c
../Cap5.xs: In function ‘CA_new’:
../Cap5.xs:445:5: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
../Cap5.xs:464:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_DESTROY’:
../Cap5.xs:475:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:493:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_change_connection_event’:
../Cap5.xs:508:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:518:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_put’:
../Cap5.xs:527:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:602:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_put_callback’:
../Cap5.xs:617:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:697:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_put_acks’:
../Cap5.xs:707:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:738:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_put_ackt’:
../Cap5.xs:748:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:762:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_get’:
../Cap5.xs:771:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:790:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_value’:
../Cap5.xs:798:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_get_callback’:
../Cap5.xs:817:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:871:5: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_create_subscription’:
../Cap5.xs:884:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:944:5: warning: cast from pointer to integer of different
size [-Wpointer-to-int-cast]
../Cap5.xs:953:5: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_clear_subscription’:
../Cap5.xs:960:18: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs:970:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_pend_io’:
../Cap5.xs:980:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_pend_event’:
../Cap5.xs:995:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_add_exception_event’:
../Cap5.xs:1083:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_replace_printf_handler’:
../Cap5.xs:1141:9: error: format not a string literal and no format
arguments [-Werror=format-security]
../Cap5.xs: In function ‘CA_field_type’:
../Cap5.xs:1149:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_element_count’:
../Cap5.xs:1160:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_name’:
../Cap5.xs:1168:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_state’:
../Cap5.xs:1176:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_is_connected’:
../Cap5.xs:1187:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_host_name’:
../Cap5.xs:1195:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_read_access’:
../Cap5.xs:1203:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
../Cap5.xs: In function ‘CA_write_access’:
../Cap5.xs:1211:23: warning: cast to pointer from integer of different
size [-Wint-to-pointer-cast]
cc1: some warnings being treated as errors
make[5]: *** [Cap5.o] Error 1
make[5]: Leaving directory
`/home/florian/dpack/tmp/epics-base-3.14.12.4/src/cap5/O.linux-x86'
make[4]: *** [install.linux-x86] Error 2
make[4]: Leaving directory
`/home/florian/dpack/tmp/epics-base-3.14.12.4/src/cap5'
make[3]: *** [cap5.install] Error 2
make[3]: Leaving directory
`/home/florian/dpack/tmp/epics-base-3.14.12.4/src'
make[2]: *** [src.install] Error 2
make[2]: Leaving directory `/home/florian/dpack/tmp/epics-base-3.14.12.4'
dh_auto_build: make -j1 USR_CFLAGS_Linux=-fstack-protector
--param=ssp-buffer-size=4 -Wformat -Werror=format-security
USR_CXXFLAGS_Linux=-fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security USR_CPPFLAGS_Linux=-D_FORTIFY_SOURCE=2
USR_LDFLAGS_Linux=-Wl,-z,relro -Wl,--as-needed returned exit code 2
make[1]: *** [override_dh_auto_build] Error 2
make[1]: Leaving directory `/home/florian/dpack/tmp/epics-base-3.14.12.4'
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1357:
dpkg-buildpackage -rfakeroot -D -us -uc -i -I failed
gbp:error: Couldn't run 'debuild -i -I': debuild -i -I returned 29
--
----------------------------------------
| Dr. Florian Feldbauer |
| |
| Helmholtz-Institut Mainz / |
| Johannes Gutenberg-Universität Mainz |
| Johann-Joachim-Becher-Weg 36 |
| D-55128 Mainz |
| |
| Office: SB1 / 00-213 |
| Phone: (+49)6131 / 39-29605 |
----------------------------------------
- Replies:
- Re: Problems building EPICS base3.14.12.4 for i386 and armhf Jani Hakala
- Re: Problems building EPICS base3.14.12.4 for i386 and armhf Andrew Johnson
- Navigate by Date:
- Prev:
Re: Installing CaLab "V.1.2.1.5" on SL6.1 Jani Hakala
- Next:
Re: Problem building asyn R4-25 on Mac OSX Yosemite Henrique Almeida
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: Problem building asyn R4-25 on Mac OSX Yosemite Mark Rivers
- Next:
Re: Problems building EPICS base3.14.12.4 for i386 and armhf Jani Hakala
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024