Francesco Montorsi | 12 Jul 13:24

bakefile problems with --enable-shared option

[sending this reply to wxcode-users, too]

Hi Ulrich, and all wxCode devs,

Ulrich Telle ha scritto:
> Although the option --enable-shared=no (or --disable-shared) is 
> specified when running ./configure running make does not build wxSQLite3 as a 
> static library but as a shared library.
same here. The --enable-shared/--disable-shared options are simply 
ignored by wxCode component build systems (not only by wxsqlite3).

I'm not sure when this bug was introduced (I tried to search in the 
CVS/SVN history without success)... but I'm sure it worked originally.

> Is there anything wrong with my bakefile?
there's nothing wrong with your bakefile... however I've found that the 
problem is deeper. The fact is that your component (like all other 
wxCode components! I've checked this!) uses

WXCODE_OPTIONS([debug,unicode,shared,toolkit,wxshared,wxversion])

in the configure.ac i.e. specifies not only wxshared but also "shared" 
option. This is wrong. In fact, there's no SHARED option declared in the 
wxCode bakefile or in your component's bakefile.

wx autoconf macros and wx bakefile presets in fact are affected only by 
the value of WX_SHARED (the --with-wxshared option in fact works as 
intended).

This is confirmed also by the fact that the components' win32 makefiles 
(Continue reading)

Ulrich Telle | 12 Jul 14:17

Re: bakefile problems with --enable-shared option

Hi Francesco,

> same here. The --enable-shared/--disable-shared options are simply 
> ignored by wxCode component build systems (not only by wxsqlite3).

Interestingly the log messages of the configure tell exactly what the 
user wants (static build of the wxCode component used with a shared 
build of wxWidgets), only the generated makefile does not work like 
expected.

It would be better if the configure script would complain about 
mismatched options instead.

> Currently the configuration you give to the configure script (using the 
> --enable-debug,--enable-unicode,--with-wxshared options) or to the win32 
> makefiles (using WX_DEBUG, WX_UNICODE, WX_SHARED) _must_ match the 
> configuration of a wxWidgets build.
> 
> I hope I cleared the issue :)

Well, yes, but I remember there was a discussion quite long ago 
regarding exactly this issue, that is, building a wxCode component with 
options not matching the used wxWidgets build options. And I thought the 
WX_SHARED option was introduced just to solve this issue. But I may be 
mistaken.

> Now there are two solutions to fix this problem:
> 
> 1) remove from the configure.ac of all wxCode components the "wxshared" 
> option and leave only the "shared" option. Then set in the 
(Continue reading)

Francesco Montorsi | 13 Jul 17:46

Re: bakefile problems with --enable-shared option

Ulrich Telle ha scritto:
> Hi Francesco,
> 
>> same here. The --enable-shared/--disable-shared options are simply 
>> ignored by wxCode component build systems (not only by wxsqlite3).
> 
> Interestingly the log messages of the configure tell exactly what the 
> user wants (static build of the wxCode component used with a shared 
> build of wxWidgets), only the generated makefile does not work like 
> expected.
> 
> It would be better if the configure script would complain about 
> mismatched options instead.
this should be already done: try to give --enable-shared --without-wxshared.

It doesn't complain on the opposite case since it should be allowed to 
give --disable-shared --with-wxshared; it's just that the bakefile part 
for the SHARED option is missing.

>> Currently the configuration you give to the configure script (using the 
>> --enable-debug,--enable-unicode,--with-wxshared options) or to the win32 
>> makefiles (using WX_DEBUG, WX_UNICODE, WX_SHARED) _must_ match the 
>> configuration of a wxWidgets build.
>>
>> I hope I cleared the issue :)
> 
> Well, yes, but I remember there was a discussion quite long ago 
> regarding exactly this issue, that is, building a wxCode component with 
> options not matching the used wxWidgets build options. And I thought the 
> WX_SHARED option was introduced just to solve this issue. But I may be 
(Continue reading)

Ulrich Telle | 13 Jul 20:02

Re: bakefile problems with --enable-shared option

Hi Francesco,

>> It would be better if the configure script would complain about 
>> mismatched options instead.
> this should be already done: try to give --enable-shared --without-wxshared.
> 
> It doesn't complain on the opposite case since it should be allowed to 
> give --disable-shared --with-wxshared; it's just that the bakefile part 
> for the SHARED option is missing.

You are right.

> I think we discussed something similar (i.e. whether we should use as 
> option names BUILD/SHARED/UNICODE as win32 wx makefiles do or rather 
> WX_DEBUG/WX_SHARED/WX_UNICODE option names -- we decided for the 
> latter)... but I don't think they we decided about coexistence of SHARED 
> and WX_SHARED...

You are right again. The discussion was about introducing WX_ prefixed 
options and, yes, we didn't decide the latter but the introduction.

> actually I tried to implement it and it results easier than I thought.
> [...]
> I have just committed updated version of wxCode bakefiles both to 
> CVS and SVN.

Great. I'll give it a try within the next few days.

> I'd appreciate if other peoples tested the modified build system...

(Continue reading)


Gmane