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                                .''`. 
lu...@debian.org                    : :Ⓐ  :  # apt-get install anarchism
                                    `. `'` 
                                      `-   

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to