Re: [ccache] build octave with ccache causes segfault when checkinstall

2015-07-04 Thread Joel Rosdahl
Hi Kim,

You forgot to say which version of ccache and checkinstall you are using.

There was a bug fix in ccache 3.1.6 related to this, but I guess you
already know that since you chose to continue the mail thread started in
2011 and reuse formulations from Andreas Weber's original mail? :-) See
http://www.mail-archive.com/ccache%40lists.samba.org/msg00687.html for the
thread start.

I just checked the latest checkinstall code in
http://checkinstall.izto.org/checkinstall.git and it seems like its wrapped
getcwd still has the bug I described in
http://www.mail-archive.com/ccache%40lists.samba.org/msg00701.html, so a
bug report against checkinstall would be in order.

If you are using ccache 3.1.6 and newer, there is still something that
should be fixed in ccache.

-- Joel


On 2 July 2015 at 08:48, Kim Sun  wrote:

> Dear maintainers,
>
> if I try to build the latest octave development source with ccache and
> afterwards checkinstall, the process fails on checkinstall. The whole
> procedure:
>
> apt-get install git mercurial autoconf automake flex bison gperf gnuplot
> libreadline5-dev libncurses5-dev zlib1g-dev libatlas-base-dev fftw3-dev
> libglpk-dev libsuitesparse-dev libarpack2-dev libhdf5-mpich-dev
> libpcre3-dev libcurl4-gnutls-dev libqhull-dev gfortran libfltk1.1-dev
> libgraphicsmagick++1-dev transfig epstool libhdf5-serial-dev
> libfontconfig1-dev texlive
>
>
> export CXX="ccache g++"
>
> export CC="ccache gcc"
>
>
> /home/andy/src/build_octave/libtool: line 8970:  4125 Segmentation fault
>
>  ccache g++ -fPIC -DPIC -shared -nostdlib
>
> /usr/lib/x86_64-linux-gnu/crti.o
>
> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o
>
> [removed lines]
>
> .libs/liboctave_la-smx-scm-cm.o .libs/liboctave_la-smx-bm-sbm.o
>
> .libs/liboctave_la-smx-sbm-bm.o -Wl,--whole-archive
>
> ../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a
>
> -Wl,--no-whole-archive -Wl,-rpath -Wl,/usr/local/lib/octave/3.5.0+
>
> -L/usr/local/lib/octave/3.5.0+ -lcruft -lcholmod -lumfpack -lamd -lcamd
>
> -lcolamd -lccolamd -lcxsparse -lqrupdate -L/usr/lib -lfftw3 -lfftw3f
>
> -llapack -lcblas -lf77blas -latlas -lreadline -lncurses -lpcre -ldl
>
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1
>
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/../lib
>
> -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../..
>
> -L/usr/lib/x86_64-linux-gnu -lgfortran -lquadmath -lstdc++ -lm -lc
>
> -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o
>
> /usr/lib/x86_64-linux-gnu/crtn.o -O2 -O2 -pthread -O2 -Wl,-rpath
>
> -Wl,/usr/local/lib/octave/3.5.0+ -pthread -Wl,-soname -Wl,liboctave.so.0
>
> -o .libs/liboctave.so.0.0.0
>
> libtool: install: error: relink `liboctave.la' with the above command
>
> before installing it
>
> make[4]: *** [install-octlibLTLIBRARIES] Fehler 1
>
>
>
> This looks like ccache causes a segfault. I have reproduced this on
>
> different machines over the last 4 months.
>
>
>
> If I run checkinstall without ccache it completes without error.
>
>
>
> So my big questions are:
>
> Am I doing something wrong in building octave?
>
> Do you have the same problems when using ccache and checkinstall.
>
> Should I fill a bug report against ccache (my guess) or checkinstall?
>
>
>
> BR
> Kim
>
> ___
> ccache mailing list
> ccache@lists.samba.org
> https://lists.samba.org/mailman/listinfo/ccache
>
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] build octave with ccache causes segfault when checkinstall

2015-07-02 Thread Martin Pool
Sounds like a ccache bug. See if you can get a traceback or core file.

On Fri, Jul 3, 2015, 5:15 AM Kim Sun  wrote:

> Dear maintainers,
>
> if I try to build the latest octave development source with ccache and
> afterwards checkinstall, the process fails on checkinstall. The whole
> procedure:
>
> apt-get install git mercurial autoconf automake flex bison gperf gnuplot
> libreadline5-dev libncurses5-dev zlib1g-dev libatlas-base-dev fftw3-dev
> libglpk-dev libsuitesparse-dev libarpack2-dev libhdf5-mpich-dev
> libpcre3-dev libcurl4-gnutls-dev libqhull-dev gfortran libfltk1.1-dev
> libgraphicsmagick++1-dev transfig epstool libhdf5-serial-dev
> libfontconfig1-dev texlive
>
>
> export CXX="ccache g++"
>
> export CC="ccache gcc"
>
>
> /home/andy/src/build_octave/libtool: line 8970:  4125 Segmentation fault
>
>  ccache g++ -fPIC -DPIC -shared -nostdlib
>
> /usr/lib/x86_64-linux-gnu/crti.o
>
> /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o
>
> [removed lines]
>
> .libs/liboctave_la-smx-scm-cm.o .libs/liboctave_la-smx-bm-sbm.o
>
> .libs/liboctave_la-smx-sbm-bm.o -Wl,--whole-archive
>
> ../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a
>
> -Wl,--no-whole-archive -Wl,-rpath -Wl,/usr/local/lib/octave/3.5.0+
>
> -L/usr/local/lib/octave/3.5.0+ -lcruft -lcholmod -lumfpack -lamd -lcamd
>
> -lcolamd -lccolamd -lcxsparse -lqrupdate -L/usr/lib -lfftw3 -lfftw3f
>
> -llapack -lcblas -lf77blas -latlas -lreadline -lncurses -lpcre -ldl
>
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1
>
> -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/../lib
>
> -L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../..
>
> -L/usr/lib/x86_64-linux-gnu -lgfortran -lquadmath -lstdc++ -lm -lc
>
> -lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o
>
> /usr/lib/x86_64-linux-gnu/crtn.o -O2 -O2 -pthread -O2 -Wl,-rpath
>
> -Wl,/usr/local/lib/octave/3.5.0+ -pthread -Wl,-soname -Wl,liboctave.so.0
>
> -o .libs/liboctave.so.0.0.0
>
> libtool: install: error: relink `liboctave.la' with the above command
>
> before installing it
>
> make[4]: *** [install-octlibLTLIBRARIES] Fehler 1
>
>
>
> This looks like ccache causes a segfault. I have reproduced this on
>
> different machines over the last 4 months.
>
>
>
> If I run checkinstall without ccache it completes without error.
>
>
>
> So my big questions are:
>
> Am I doing something wrong in building octave?
>
> Do you have the same problems when using ccache and checkinstall.
>
> Should I fill a bug report against ccache (my guess) or checkinstall?
>
>
>
> BR
> Kim
>
> ___
> ccache mailing list
> ccache@lists.samba.org
> https://lists.samba.org/mailman/listinfo/ccache
>
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] build octave with ccache causes segfault when checkinstall

2015-07-02 Thread Kim Sun
Dear maintainers,

if I try to build the latest octave development source with ccache and
afterwards checkinstall, the process fails on checkinstall. The whole
procedure:

apt-get install git mercurial autoconf automake flex bison gperf gnuplot
libreadline5-dev libncurses5-dev zlib1g-dev libatlas-base-dev fftw3-dev
libglpk-dev libsuitesparse-dev libarpack2-dev libhdf5-mpich-dev
libpcre3-dev libcurl4-gnutls-dev libqhull-dev gfortran libfltk1.1-dev
libgraphicsmagick++1-dev transfig epstool libhdf5-serial-dev
libfontconfig1-dev texlive


export CXX="ccache g++"

export CC="ccache gcc"


/home/andy/src/build_octave/libtool: line 8970:  4125 Segmentation fault

 ccache g++ -fPIC -DPIC -shared -nostdlib

/usr/lib/x86_64-linux-gnu/crti.o

/usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o

[removed lines]

.libs/liboctave_la-smx-scm-cm.o .libs/liboctave_la-smx-bm-sbm.o

.libs/liboctave_la-smx-sbm-bm.o -Wl,--whole-archive

../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a

-Wl,--no-whole-archive -Wl,-rpath -Wl,/usr/local/lib/octave/3.5.0+

-L/usr/local/lib/octave/3.5.0+ -lcruft -lcholmod -lumfpack -lamd -lcamd

-lcolamd -lccolamd -lcxsparse -lqrupdate -L/usr/lib -lfftw3 -lfftw3f

-llapack -lcblas -lf77blas -latlas -lreadline -lncurses -lpcre -ldl

-L/usr/lib/gcc/x86_64-linux-gnu/4.6.1

-L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/../lib

-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../..

-L/usr/lib/x86_64-linux-gnu -lgfortran -lquadmath -lstdc++ -lm -lc

-lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o

/usr/lib/x86_64-linux-gnu/crtn.o -O2 -O2 -pthread -O2 -Wl,-rpath

-Wl,/usr/local/lib/octave/3.5.0+ -pthread -Wl,-soname -Wl,liboctave.so.0

-o .libs/liboctave.so.0.0.0

libtool: install: error: relink `liboctave.la' with the above command

before installing it

make[4]: *** [install-octlibLTLIBRARIES] Fehler 1



This looks like ccache causes a segfault. I have reproduced this on

different machines over the last 4 months.



If I run checkinstall without ccache it completes without error.



So my big questions are:

Am I doing something wrong in building octave?

Do you have the same problems when using ccache and checkinstall.

Should I fill a bug report against ccache (my guess) or checkinstall?



BR
Kim

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] build octave with ccache causes segfault when checkinstall

2011-08-03 Thread Joel Rosdahl
On 2011-07-04 14:44, Andreas Weber wrote:
> [...]
> andy@PhenomBabe:~/src/build_octave$ checkinstall
> ...
> /home/andy/src/build_octave/libtool: line 8970:  4125 Segmentation fault
>  ccache g++ -fPIC -DPIC -shared -nostdlib
> [...]
> This looks like ccache causes a segfault. I have reproduced this on
> different machines over the last 4 months.

I have now also reproduced the segfault. There's a bug in checkinstall's
installwatch wrapper that triggers a bug in ccache.

More specifically, checkinstall calls installwatch to run a command
whose file system accesses are to be watched, and this is done by
preloading installwatch.so, which wraps a number of functions. The
wrapped getcwd(buffer, size) function copies the result to the buffer
but returns a pointer to an internally allocated buffer (and leaks the
memory, by the way), which works for callers that do this:

char buffer[MAXPATHLEN];
if (!getcwd(buffer, sizeof(buffer)) {
/* Failure */
}

But not for callers that do this:

char buffer[MAXPATHLEN];
if (getcwd(buffer, sizeof(buffer) != buffer) {
/* Failure */
}

(getcwd is specified to return the buffer pointer on success, so both
versions are valid.) ccache does the latter, and then fails to handle
the failed getcwd call correctly.

I'll include a fix in ccache 3.1.6.

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] build octave with ccache causes segfault when checkinstall

2011-08-01 Thread Jordi GutiƩrrez Hermoso
On 4 July 2011 07:44, Andreas Weber  wrote:
> if I try to build the latest octave development source with ccache
> and afterwards checkinstall, the process fails on checkinstall.
[snip]
> This looks like ccache causes a segfault. I have reproduced this on
> different machines over the last 4 months.
>
> If I run checkinstall without ccache it completes without error.
>
> So my big questions are:
> Am I doing something wrong in building octave?

Doeosn't look like it.

> Do you have the same problems when using ccache and checkinstall.

Yes, I was just able to reproduce it.

> Should I fill a bug report against ccache (my guess) or checkinstall?

Well, ccache shouldn't be segfaulting, but is this a problem about
Octave at all? Have you tried to build another project with ccache and
checkinstall?

- Jordi G. H.
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


[ccache] build octave with ccache causes segfault when checkinstall

2011-07-04 Thread Andreas Weber
Dear maintainers,

if I try to build the latest octave development source with ccache and
afterwards checkinstall, the process fails on checkinstall. The whole
procedure:

apt-get install git mercurial autoconf automake flex bison gperf gnuplot
libreadline5-dev libncurses5-dev zlib1g-dev libatlas-base-dev fftw3-dev
libglpk-dev libsuitesparse-dev libarpack2-dev libhdf5-mpich-dev
libpcre3-dev libcurl4-gnutls-dev libqhull-dev gfortran libfltk1.1-dev
libgraphicsmagick++1-dev transfig epstool libhdf5-serial-dev
libfontconfig1-dev texlive

wget
http://sourceforge.net/projects/qrupdate/files/qrupdate/1.1/qrupdate-1.1.1.tar.gz
tar xzf qrupdate-1.1.1.tar.gz
cd qrupdate-1.1.1/
make lib
sudo make install
cd ..

export CXX="ccache g++"
export CC="ccache gcc"

hg clone http://www.octave.org/hg/octave
cd octave
[remove depth=2 in bootstrap line 500, to fix git+gnulib problem]
./autogen.sh
cd ..
mkdir build_octave && cd build_octave
../octave/configure --enable-shared --disable-static
--build=x86_64-pc-linux-gnu
...
make -j5
...
andy@PhenomBabe:~/src/build_octave$ make check
...
Summary:
  PASS   7166
  FAIL  0

There was 1 expected failure (see fntests.log for details).
...
andy@PhenomBabe:~/src/build_octave$ checkinstall
...
/home/andy/src/build_octave/libtool: line 8970:  4125 Segmentation fault
 ccache g++ -fPIC -DPIC -shared -nostdlib
/usr/lib/x86_64-linux-gnu/crti.o
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtbeginS.o
[removed lines]
.libs/liboctave_la-smx-scm-cm.o .libs/liboctave_la-smx-bm-sbm.o
.libs/liboctave_la-smx-sbm-bm.o -Wl,--whole-archive
../libcruft/.libs/libranlib.a ../libgnu/.libs/libgnu.a
-Wl,--no-whole-archive -Wl,-rpath -Wl,/usr/local/lib/octave/3.5.0+
-L/usr/local/lib/octave/3.5.0+ -lcruft -lcholmod -lumfpack -lamd -lcamd
-lcolamd -lccolamd -lcxsparse -lqrupdate -L/usr/lib -lfftw3 -lfftw3f
-llapack -lcblas -lf77blas -latlas -lreadline -lncurses -lpcre -ldl
-L/usr/lib/gcc/x86_64-linux-gnu/4.6.1
-L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../../../lib -L/lib/../lib
-L/usr/lib/../lib -L/usr/lib/gcc/x86_64-linux-gnu/4.6.1/../../..
-L/usr/lib/x86_64-linux-gnu -lgfortran -lquadmath -lstdc++ -lm -lc
-lgcc_s /usr/lib/gcc/x86_64-linux-gnu/4.6.1/crtendS.o
/usr/lib/x86_64-linux-gnu/crtn.o -O2 -O2 -pthread -O2 -Wl,-rpath
-Wl,/usr/local/lib/octave/3.5.0+ -pthread -Wl,-soname -Wl,liboctave.so.0
-o .libs/liboctave.so.0.0.0
libtool: install: error: relink `liboctave.la' with the above command
before installing it
make[4]: *** [install-octlibLTLIBRARIES] Fehler 1

This looks like ccache causes a segfault. I have reproduced this on
different machines over the last 4 months.

If I run checkinstall without ccache it completes without error.

So my big questions are:
Am I doing something wrong in building octave?
Do you have the same problems when using ccache and checkinstall.
Should I fill a bug report against ccache (my guess) or checkinstall?

Some infos and versions:

andy@PhenomBabe:~/src/build_octave$ hg id ../octave/
ec6c52496485+
andy@PhenomBabe:~/src/build_octave$ uname -a
Linux PhenomBabe 2.6.39-2-amd64 #1 SMP Wed Jun 8 11:01:04 UTC 2011
x86_64 GNU/Linux
andy@PhenomBabe:~/src/build_octave$ cat /etc/debian_version
wheezy/sid
andy@PhenomBabe:~/src/build_octave$ apt-cache policy g++
g++:
  Installiert: 4:4.6.0-6
  Kandidat:4:4.6.0-6
  Versionstabelle:
 *** 4:4.6.0-6 0
500 http://192.168.2.3/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status
andy@PhenomBabe:~/src/build_octave$ apt-cache policy gcc
gcc:
  Installiert: 4:4.6.0-6
  Kandidat:4:4.6.0-6
  Versionstabelle:
 *** 4:4.6.0-6 0
500 http://192.168.2.3/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status
andy@PhenomBabe:~/src/build_octave$ apt-cache policy ccache
ccache:
  Installiert: 3.1.5-1
  Kandidat:3.1.5-1
  Versionstabelle:
 *** 3.1.5-1 0
500 http://192.168.2.3/debian/ wheezy/main amd64 Packages
100 /var/lib/dpkg/status

Best regards
Andy


___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache