[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#823140: RFS: caffe/1.0.0~rc3-1 -- a deep learning framework [ITP]



On 07/05/16 02:35, lumin wrote:
Hi,

I've split the caffe-cpu package and the caffe-cuda package,
and I'd like to first handle the cpu version, leaving the CUDA
version pending at debian/science/caffe-contrib.
The updated cpu version has been uploaded to mentors:

https://mentors.debian.net/package/caffe

This update involves fix on multiarch, removal of caffe-cuda,
and removal of libproto.a .

However I found that hardening-no-fortify-functions is still
unsolved, and the upstream CMakeFiles.txt seems not to be
the trouble maker, as it contains this line
```
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wall")
```
and I really see the -D_FORTIFY_SOURCE=2 option added in the
verbose gcc command line.

On Tue, 2016-05-03 at 08:03 +0000, Gianfranco Costamagna wrote:
Hi,

set(CFLAGS ...) which should be replaced by set(CFLAGS $(CFLAGS) ...)

An upstream classic unfortunately.


as upstream I did this once, and the side effect was something weird.

when you run multiple times cmake .. the cflags gets appended multiple times, so you might
end up in a really weird CMakeCache.txt and with really long build lines.

I'm not sure which way is the best one, but cmake should provide something different from CFLAGS.

e.g.
CMAKE_C_FLAGS
CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS

and so on.
that way they will be appended to current CFLAGS without having to override them manually.

(thanks again for your nice reviews!)

g.

s/DEB_CPPFLAGS_MAINT_APPEND/DEB_CXXFLAGS_MAINT_APPEND in your d/rules.

Ghis


Reply to: