./configure --enable-debug has no effect

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
tomay3000
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Apr 24, 2017 4:23 am

./configure --enable-debug has no effect

Postby tomay3000 » Sat Sep 09, 2017 3:51 am

hello,
I tried to compile wxWidgets using msys2 under Windows 7 32-Bit with this command:

Code: Select all

./configure --enable-unicode --enable-debug --enable-monolithic --enable-cxx11 --enable-permissive
make CXXFLAGS+="-fno-keep-inline-dllexport" LDFLAGS+="-Wl,--allow-multiple-definition"


it compiles without problems.

Then I tried to recompile it without the --enable-debug switch, it gave me this message which means that it is already built.

Code: Select all

$ make CXXFLAGS+="-fno-keep-inline-dllexport -g" LDFLAGS+="-Wl,--allow-multiple-definition"
(if test -f utils/wxrc/Makefile ; then cd utils/wxrc && make all ; fi)
make[1]: Entering directory '/c/wxWidgets-3.1.0/utils/wxrc'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/c/wxWidgets-3.1.0/utils/wxrc'


then I have thought that I was wrong in the first place (I did not compiled the first time in debug mode).

Then I have tried with

Code: Select all

--enable-debug=yes
and

Code: Select all

--enable-debug=max

without any success.

So what is the problem in this case ?
I expected the built wxWidgets file to have the letter 'd' in the end of its name!!!

Thank you for your understanding.

User avatar
doublemax
Moderator
Moderator
Posts: 11300
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: ./configure --enable-debug has no effect

Postby doublemax » Sat Sep 09, 2017 7:56 am

I don't use configure, but it's a little suspicious that you use "./configure" instead of "../configure". You're supposed to create a directory for each configuration, enter it, and then use "../configure" from there. Right now everything you build ends up in the wx main directory.
Use the source, Luke!

tomay3000
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Apr 24, 2017 4:23 am

Re: ./configure --enable-debug has no effect

Postby tomay3000 » Sat Sep 09, 2017 4:14 pm

doublemax wrote:I don't use configure, but it's a little suspicious that you use "./configure" instead of "../configure". You're supposed to create a directory for each configuration, enter it, and then use "../configure" from there. Right now everything you build ends up in the wx main directory.


You are right, but even though I have created different build directories, the produced files are the same for debug and release builds.
I have seen that the Makefile file will always have

Code: Select all

#WXDEBUGFLAG = d
line commented.

This is a weird behavior!

also the produced debug files will have the same size as the release one, when I expect them to have bigger file sizes.

User avatar
eranon
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 610
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: ./configure --enable-debug has no effect

Postby eranon » Sat Sep 09, 2017 6:55 pm

tomay3000 wrote:also the produced debug files will have the same size as the release one, when I expect them to have bigger file sizes.

Hello, Yes, but you don't say what this size is: is it a size which sounds like DEBUG or RELEASE?

I don't use MSYS[2], but did you well launched ../configure with the right options being in the concerned build directory each time?

Also, did you try with ../configure --enable-debug --disable-optimise for the DEBUG build?
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

tomay3000
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Apr 24, 2017 4:23 am

Re: ./configure --enable-debug has no effect

Postby tomay3000 » Sun Sep 10, 2017 7:31 am

eranon wrote:
tomay3000 wrote:also the produced debug files will have the same size as the release one, when I expect them to have bigger file sizes.

Hello, Yes, but you don't say what this size is: is it a size which sounds like DEBUG or RELEASE?

I don't use MSYS[2], but did you well launched ../configure with the right options being in the concerned build directory each time?

Also, did you try with ../configure --enable-debug --disable-optimise for the DEBUG build?

The produced files are both about 27mb when I expect it to be about 300mb for monolithic debug build.
Yesterday on the wx irc chanel I have been told that starting from wx 3 all builds are debug enabled by default under linux and os x and will have the release name and size. And since I am using msys2, It simulates the linux system under windows.

User avatar
eranon
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 610
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: ./configure --enable-debug has no effect

Postby eranon » Sun Sep 10, 2017 11:50 am

tomay3000 wrote:Yesterday on the wx irc chanel I have been told that starting from wx 3 all builds are debug enabled by default under linux and os x and will have the release name and size. And since I am using msys2, It simulates the linux system under windows.

I don't know about wxWidgets under Linux, but the size of the DEBUG and RELEASE flavors of wxWidgets under OS X are totally different. Below is a snapshot of my wx libs on my Mac dev station (currently OS X 10.9 Mavericks). However, the names are identical, yes!

snap_0004943.png
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]

tomay3000
Earned a small fee
Earned a small fee
Posts: 17
Joined: Mon Apr 24, 2017 4:23 am

Re: ./configure --enable-debug has no effect

Postby tomay3000 » Sun Sep 10, 2017 9:50 pm

eranon wrote:but the size of the DEBUG and RELEASE flavors of wxWidgets under OS X are totally different.

May be it is due to LLVM optimizitions or somthing else related to the compiler, because me I use gnu gcc compiler. Anyway, pass me your ./configure and make command lines to try rebuilding with it and see what I get.
Thanks in advance.

User avatar
eranon
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 610
Joined: Sun May 13, 2012 11:42 pm
Location: France
Contact:

Re: ./configure --enable-debug has no effect

Postby eranon » Mon Sep 11, 2017 12:55 am

tomay3000 wrote:
eranon wrote:but the size of the DEBUG and RELEASE flavors of wxWidgets under OS X are totally different.

May be it is due to LLVM optimizitions or somthing else related to the compiler, because me I use gnu gcc compiler

The previous screenshot was effectivelly about a wxWidgets built with LLVM Clang, but this one below has been built with the original GCC (x86 target) from the Free Software Foundation, still under OS X (until a recent time, my apps were built with FSF GCC).

snap_0004945.png


tomay3000 wrote:Anyway, pass me your ./configure and make command lines to try rebuilding with it and see what I get.
Thanks in advance.

Here are the ways I built wxWidgets 3.1.0 under OS X 10.9 Mavericks against LLVM Clang.

Code: Select all

DEBUG 64-bit:
mkdir ./static_debug_clang_x64
cd ./static_debug_clang_x64
../configure CC="clang" CXX="clang++" CPP="clang -E" CXXCPP="clang++ -E" LD="clang++" CFLAGS="" CXXFLAGS="-std=c++11 -stdlib=libc++" CPPFLAGS="-stdlib=libc++" OBJCFLAGS="" OBJCXXFLAGS="-std=c++11 -stdlib=libc++" LDFLAGS="-stdlib=libc++" --enable-unicode --disable-shared --disable-compat28 --with-cocoa --enable-macosx_arch=x86_64 --with-macosx-version-min=10.9 --enable-debug --disable-optimise --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-regex=builtin --with-zlib=builtin --with-expat=builtin --prefix="$(pwd)"
make -j6

RELEASE 64-bit:
mkdir ./static_release_clang_x64
cd ./static_release_clang_x64
../configure CC="clang" CXX="clang++" CPP="clang -E" CXXCPP="clang++ -E" LD="clang++" CFLAGS="-O2" CXXFLAGS="-std=c++11 -stdlib=libc++ -O2" CPPFLAGS="-stdlib=libc++ -O2" OBJCFLAGS="-O2" OBJCXXFLAGS="-std=c++11 -stdlib=libc++ -O2" LDFLAGS="-stdlib=libc++ -dead_strip" --enable-unicode --disable-shared --disable-compat28 --with-cocoa --enable-macosx_arch=x86_64 --with-macosx-version-min=10.9 --disable-debug --disable-debug_info --disable-debug_flag --enable-optimise --with-libjpeg=builtin --with-libpng=builtin --with-libtiff=builtin --with-regex=builtin --with-zlib=builtin --with-expat=builtin --prefix="$(pwd)"
make -j6
[eventual make install]

And I do the equivalent for the 32-bit targets too.
[Ind. dev. - wxWidgets 3.0/3.1 under "Win 7 64-bit, TDM64-GCC" + "OS X 10.9, LLVM Clang"]


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests