[Pkg-octave-devel] [Reproducible-builds] Trying to fix random_buildpath_by_octave
Jérémy Bobbio
lunar at debian.org
Tue Oct 27 12:47:20 UTC 2015
Rafael Laboissiere:
> I think that I found the culprit. The .oct files for octave are built using
> the mkoctfile program, as you pointed out above. This program uses default
> values for the the environment variables containing flags for the to C++
> compilation and binary link. For instance:
>
> $ mkdir tmp-1
> $ cp /usr/share/doc/liboctave-dev/examples/oregonator.cc tmp-1
> $ (cd tmp-1 ; mkoctfile -v oregonator.cc)
> g++ -c -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/octave-4.0.0/octave/.. -I/usr/include/octave-4.0.0/octave -I/usr/include/hdf5/serial -I/usr/include/mpi -pthread -fopenmp -mieee-fp -g -O2 -fstack-protector-strong -Wformat -Werror=format-security oregonator.cc -o oregonator.o
> g++ -shared -Wl,-Bsymbolic -o oregonator.oct oregonator.o -L/usr/lib/i386-linux-gnu/octave/4.0.0 -L/usr/lib/i386-linux-gnu -loctinterp -loctave -Wl,-z,relro
>
> I discovered that the "-g" is responsible for the difffrences in the
> resulting binaries. Here is the proof:
>
> $ (cd ../tmp-1 ; CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security" mkoctfile oregonator.cc ; md5sum oregonator.o*)
> e10495ec145b6c3f946c1728fa64afd2 oregonator.o
> 641e6c9a7ee23b38a4452e6337f8a6b5 oregonator.oct
Is `mkoctfile` creating a randomly-named temporary file? g++ will write
the full path to the source file in the debug symbols. That would
explain why removing `-g` solve the problem.
--
Lunar .''`.
lunar at debian.org : :Ⓐ : # apt-get install anarchism
`. `'`
`-
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-octave-devel/attachments/20151027/1988f20a/attachment.sig>
More information about the Pkg-octave-devel
mailing list