Build Octave Debug for Windows

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Build Octave Debug for Windows

ellocco
Hi,

I fail to build MXE-Octave with the proposed options specified here:

Trouble maker is the option: --enable-address-sanitizer-flags

The command:
configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-address-sanitizer-flags –prefix=/opt/dbg-octave
gives the warning message:
unrecognized options: --enable-address-sanitizer-flags
What I did under Ubuntu 20.04 to correct this, was the following:
sudo apt-get update
sudo apt-get install libasan5-amd64-cross
And I set the environment variable "ASAN_OPTIONS" as follows:

export ASAN_OPTIONS=symbolize=1


Has someone an idea what to do?

Attached a start for a HowTo-Do document.

Regards,

Stefan

--
Stefan Pofahl
Zollgasse 5
8020 Graz
Österreich
Tel.: +43 (316) 33 2001



Build Octave under Ubuntu 20.04.odt (58K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Build Octave Debug for Windows

ellocco
Unfortunately, the build fails:

******************************************************************************************************************************************
[...]
Failed to build package blas!
------------------------------------------------------------
/home/spofahl/octave/octave-dbg/usr/bin/x86_64-w64-mingw32-gfortran   -O3 -c isamax.f -o isamax.o
make[3]: /home/spofahl/octave/octave-dbg/usr/bin/x86_64-w64-mingw32-gfortran: Befehl nicht gefunden
make[3]: *** [Makefile:179: isamax.o] Fehler 127
make[3]: Verzeichnis „/home/spofahl/octave/octave-dbg/tmp-blas/BLAS-3.8.0“ wird verlassen
make[2]: *** [/home/spofahl/octave/octave-dbg/Makefile:940: build-only-blas] Fehler 2
make[2]: Verzeichnis „/home/spofahl/octave/octave-dbg“ wird verlassen
real    0m1.740s
user    0m1.530s
sys     0m0.192s
------------------------------------------------------------
[log]      /home/spofahl/octave/octave-dbg/log/blas

make[1]: *** [Makefile:942: /home/spofahl/octave/octave-dbg/installed-packages/blas] Fehler 1
make[1]: *** Auf noch nicht beendete Prozesse wird gewartet …
[done]     build-gperf
[done]     build-sed
[done]     build-gawk
make[1]: Verzeichnis „/home/spofahl/octave/octave-dbg“ wird verlassen
make: *** [Makefile:621: all] Fehler 2
******************************************************************************************************************************************

Is this a bug? Or have I made a mistake?

Regards,

Stefan

Am Mo., 8. Juni 2020 um 15:37 Uhr schrieb Stefan Pofahl <[hidden email]>:
Hi,

I fail to build MXE-Octave with the proposed options specified here:

Trouble maker is the option: --enable-address-sanitizer-flags

The command:
configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-address-sanitizer-flags –prefix=/opt/dbg-octave
gives the warning message:
unrecognized options: --enable-address-sanitizer-flags
What I did under Ubuntu 20.04 to correct this, was the following:
sudo apt-get update
sudo apt-get install libasan5-amd64-cross
And I set the environment variable "ASAN_OPTIONS" as follows:

export ASAN_OPTIONS=symbolize=1


Has someone an idea what to do?

Attached a start for a HowTo-Do document.

Regards,

Stefan

--
Stefan Pofahl
Zollgasse 5
8020 Graz
Österreich
Tel.: +43 (316) 33 2001


--
Stefan Pofahl
Zollgasse 5
8020 Graz
Österreich
Tel.: +43 (316) 33 2001


Reply | Threaded
Open this post in threaded view
|

Re: Build Octave Debug for Windows

mmuetzel
In reply to this post by ellocco
Am 08. Juni 2020 um 15:37 Uhr schrieb "Stefan Pofahl":

> Hi,
>  
> I fail to build MXE-Octave with the proposed options specified here:
> https://wiki.octave.org/Debugging_Octave#Debugging_oct-files
>  
> Trouble maker is the option: --enable-address-sanitizer-flags
>  
> The command:
> configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-address-sanitizer-flags –prefix=/opt/dbg-octave
>
> gives the warning message:
> unrecognized options: --enable-address-sanitizer-flags
>
> What I did under Ubuntu 20.04 to correct this, was the following:
> sudo apt-get updatesudo apt-get install libasan5-amd64-cross
>
> And I set the environment variable "ASAN_OPTIONS" as follows:
> export ASAN_OPTIONS=symbolize=1
>

> Has someone an idea what to do?

> Attached a start for a HowTo-Do document.

> Regards,

> Stefan

You probably won't believe it at this point. But I'm really trying to help you.

I don't understand why you would try to compile with address sanitizer flags if you want to find the cause of a segfault (not a memory leak!).

Please, read again the first mail that I sent you on Saturday. It contains step by step instructions on how to build Octave for Windows including debug symbols.

Anyway, I still think it would be best if you first create a backtrace with the Octave that you have already installed...

Markus



Reply | Threaded
Open this post in threaded view
|

Re: Build Octave Debug for Windows

ellocco
Hi,

the option:
" --enable-address-sanitizer-flag"
is proposed here:
<a href="https://wiki.octave.org/Debugging_Octave#Debugging_oct-files#Preliminaries">https://wiki.octave.org/Debugging_Octave#Debugging_oct-files#Preliminaries
this was the reason ...

Meanwhile I have figured out, how I can pass this option to the compiler, it worked for me with:
" CPPFLAGS=-fsanitize=address"

At the end I have used a mixture from the proposed configuration by Markus and
<a href="https://wiki.octave.org/Debugging_Octave#Debugging_oct-files#Preliminaries">https://wiki.octave.org/Debugging_Octave#Debugging_oct-files#Preliminaries

The full configure command was:
/home/spofahl/hg/mxe-octave/configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g CPPFLAGS=-fsanitize=address --prefix=/opt/dbg-octave --enable-devel-tools --disable-strip-dist-files --enable-windows-64 --enable-octave=release --enable-binary-packages -with-pkg-dir=/home/spofahl/hg/mxe-octave-pkg

I invoked this command in the build directory (outside of: " /home/spofahl/hg/mxe-octave") as proposed on the abovementioned
internet-site. And I am open to compile once more with further optimized configuration options for the purpose of debugging.

I am looking for a place to upload my debug-Octave-Build for others, has someone web-space where I can upload this
archive-file of 1GB?

Regards,

Stefan




Am Mo., 8. Juni 2020 um 16:15 Uhr schrieb Markus Mützel <[hidden email]>:
Am 08. Juni 2020 um 15:37 Uhr schrieb "Stefan Pofahl":
> Hi,
>  
> I fail to build MXE-Octave with the proposed options specified here:
> https://wiki.octave.org/Debugging_Octave#Debugging_oct-files
>  
> Trouble maker is the option: --enable-address-sanitizer-flags
>  
> The command:
> configure FFLAGS=-g CFLAGS=-g CXXFLAGS=-g --enable-address-sanitizer-flags –prefix=/opt/dbg-octave
>
> gives the warning message:
> unrecognized options: --enable-address-sanitizer-flags
>
> What I did under Ubuntu 20.04 to correct this, was the following:
> sudo apt-get updatesudo apt-get install libasan5-amd64-cross
>
> And I set the environment variable "ASAN_OPTIONS" as follows:
> export ASAN_OPTIONS=symbolize=1
>

> Has someone an idea what to do?

> Attached a start for a HowTo-Do document.

> Regards,

> Stefan

You probably won't believe it at this point. But I'm really trying to help you.

I don't understand why you would try to compile with address sanitizer flags if you want to find the cause of a segfault (not a memory leak!).

Please, read again the first mail that I sent you on Saturday. It contains step by step instructions on how to build Octave for Windows including debug symbols.

Anyway, I still think it would be best if you first create a backtrace with the Octave that you have already installed...

Markus



--
Stefan Pofahl
Zollgasse 5
8020 Graz
Österreich
Tel.: +43 (316) 33 2001