Piotras | 2 May 16:13

Re: Simplified build system for core/midgard

Jukka Zitting <jz@...> wrote:

> The overall functionality of the build system remains the same and there
> should be no need to change the existing spec files or other build
> scripts. A fresh CVS checkout can be built and installed as before:
> 
>     $ ./bootstrap
>     $ ./configure # options...
>     $ make
>     # make install

I can not build sources:

./bootstrap

automake: Makefile.am: not supported: source file `src/midgard.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/format.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/fmt_russian.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/md5.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/tree.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/repligard.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/filetemplate.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/iconvxml.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/access.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/tree_core.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/pageresolve.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/preparse.l' is in subdirectory
automake: Makefile.am: not supported: source file `src/types.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/mgdschema.c' is in subdirectory
automake: Makefile.am: not supported: source file `src/config.c' is in subdirectory
(Continue reading)

Jukka Zitting | 2 May 19:56
Picon

Re: Simplified build system for core/midgard

Hi,

Piotras wrote:
> I can not build sources:
> 
> ./bootstrap
> 
> automake: Makefile.am: not supported: source file `src/midgard.c' is in subdirectory
> [...]

What's your automake version? Automake should support sources in
subdirectories since version 1.5, released in 2001.

BR,

Jukka Zitting
Piotras | 2 May 21:16

Re: Simplified build system for core/midgard

> Hi,
>
> Piotras wrote:
>> I can not build sources:
>>
>> ./bootstrap
>>
>> automake: Makefile.am: not supported: source file `src/midgard.c' is in
>> subdirectory
>> [...]
>
> What's your automake version? Automake should support sources in
> subdirectories since version 1.5, released in 2001.

1.6
I may install 1.9 , but it is not the point.
Piotras
Piotras | 2 May 21:41

Re: Simplified build system for core/midgard

>> automake: Makefile.am: not supported: source file `src/midgard.c' is in
>> subdirectory
>> [...]
>
> What's your automake version? Automake should support sources in
> subdirectories since version 1.5, released in 2001.

I had to change aclocal and automake commands to aclocal-1.6 and automake-1.6
in bootstrap.
What is the current minimum version required?
Can you change bootstrap to use correct versions?
Bootstrap should run on few different systems automagically ( like now from cron on
nathan ), so we can not update it for local paths.

There is some issue with make and header files included.

make

 gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
-DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"midgard\"
-DVERSION=\"1.7.0\" -DYYTEXT_POINTER=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1
-DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1
-DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1
-DHAVE_DLFCN_H=1 -DSTDC_HEADERS=1 -DHAVE_ZLIB_H=1 -DHAVE_CRYPT_H=1 -DHAVE_ICONV=1
-DHAVE_ERRMSG_H=1 -DHAVE_MYSQL_H=1 -I. -I. -I/usr/include/libxml2
-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/mysql -Wall -g
-O2 -c src/midgard.c -MT midgard.lo -MD -MP -MF .deps/midgard.TPlo  -fPIC -DPIC -o
.libs/midgard.o
In file included from src/midgard.c:33:
midgard/parsers.h:26:25: fmt_russian.h: No such file or directory
(Continue reading)

Jukka Zitting | 2 May 22:00
Picon

Re: Simplified build system for core/midgard

Hi,

Piotras answered:
> > What's your automake version? Automake should support sources in
> > subdirectories since version 1.5, released in 2001.
> 
> 1.6
> I may install 1.9 , but it is not the point.

Hmm, I just tried bootstrapping with automake 1.6 and had no problems.

Anyhow, I think it is fair to expect CVS users to have fairly recent
versions of the essential build tools.

BR,

Jukka Zitting
Piotras | 2 May 22:05

Re: Simplified build system for core/midgard

> Hi,
>
> Piotras answered:
>> > What's your automake version? Automake should support sources in
>> > subdirectories since version 1.5, released in 2001.
>>
>> 1.6
>> I may install 1.9 , but it is not the point.
>
> Hmm, I just tried bootstrapping with automake 1.6 and had no problems.
>
> Anyhow, I think it is fair to expect CVS users to have fairly recent
> versions of the essential build tools.

Yeah :) But see my other mail.

Piotras
Jukka Zitting | 2 May 22:40
Picon

Re: Simplified build system for core/midgard

Hi,

Piotras wrote:
> What is the current minimum version required?

I believe automake 1.5 should work, at least 1.6 does.

> Can you change bootstrap to use correct versions?

I'd rather leave bootstrap as is. Instead I just committed a change to
configure.in that declares the minimum required automake version. That
way you'll get a nice error message if you're using an older version
(assuming that the older version knows how to check the required
version!).

> There is some issue with make and header files included.
> [..]
> In file included from src/midgard.c:33:
> midgard/parsers.h:26:25: fmt_russian.h: No such file or directory
> src/midgard.c: In function `mgd_init_ex':
> src/midgard.c:195: warning: implicit declaration of function `mgd_parser_init_raw'
> src/midgard.c: In function `mgd_auth_su':
> src/midgard.c:669: warning: label `fallback' defined but not used
> make: *** [midgard.lo] Error 1
> 
> LOG_DOMAIN for g_log is missed and mgderr.h not included in headers.

These are code problems and not related to the build scripts. We should
probably standardize the header formats and includes somehow, the
current dependency graph is rather messy.
(Continue reading)

Piotras | 2 May 22:51

Re: Simplified build system for core/midgard

>> What is the current minimum version required?
>
> I believe automake 1.5 should work, at least 1.6 does.
>
>> Can you change bootstrap to use correct versions?
>
> I'd rather leave bootstrap as is. Instead I just committed a change to
> configure.in that declares the minimum required automake version. That
> way you'll get a nice error message if you're using an older version
> (assuming that the older version knows how to check the required
> version!).

Yeah , 1.6 works perfectly, but the point is to run makedist script ( and bootstrap )
from cron jobs and automagically without making any changes ).
configure.in is not an option as long as we do not have systems which uses as only (
and only ) development servers which build releases or cvs snapshots.

We should create some "can match" commands for aclocal and automake and just check
if they exists. Starting from the newest one.
Nightly cvs snapshots are built from updated (automagically) cvs , so we are not
going to have snapshosts for some time.

>> There is some issue with make and header files included.
>> [..]
>> In file included from src/midgard.c:33:
>> midgard/parsers.h:26:25: fmt_russian.h: No such file or directory
>> src/midgard.c: In function `mgd_init_ex':
>> src/midgard.c:195: warning: implicit declaration of function `mgd_parser_init_raw'
>> src/midgard.c: In function `mgd_auth_su':
>> src/midgard.c:669: warning: label `fallback' defined but not used
(Continue reading)

Jukka Zitting | 2 May 23:16
Picon

Re: Simplified build system for core/midgard

Hi,

Piotras wrote:
> Yeah , 1.6 works perfectly, but the point is to run makedist script ( and bootstrap )
> from cron jobs and automagically without making any changes ).
> configure.in is not an option as long as we do not have systems which uses as only (
> and only ) development servers which build releases or cvs snapshots.

Ah, I hadn't checked the makedist script that contains hardcoded
references to automake-1.4.

> We should create some "can match" commands for aclocal and automake and just check
> if they exists. Starting from the newest one.

I think it is better to just use the latest version and not go looking
for some specific one. The build will fail in any case if a sufficiently
recent environment is not available. I'll commit a change that removes
the version dependencies from the makedist script.

> My suggestion is:
> 
> #include midgard.h
> 
> No more no less ( for public definitions of course ).

+1 Very good.

BR,

Jukka Zitting
(Continue reading)

Piotras | 2 May 23:23

MidCOM and styles

Hi all!

There was discussion today about styles used by MidCOM and especially about style
elements served from database and from filesystem. I made re review of core's code
which "serves" style ( and page ) elements.

1. Making dynamic style changes with <(element)> syntax is not possible.
At least I see no possibility to make it working without some magic ( read: I _have
no_ idea how to make such complicated ) feature.

2. Read my blog about dynamic styles:
http://www.nemein.com/people/piotras/simple-script.html

We do not use filetamplates ( notice this magic word 'file' ), so I changed this
feature  "a little bit" to make it fully working with dynamic styles. Which means
with styles which may be set (changed) as many times during the requests as we have
lines in our editors. The only one uncomfortable issue is that this feature may be
used with mgd_template function instead of traditional <(syntax)>.

For MidCOM and other fs apps it means that we can set directory where all style
elements should be loaded from.

It may be:
mgd_style_set_from_dir("path");
If we want to pass real directory as parameter.

or
mgd_style_set_from_dir(void);
Directory is set according to MidCOM component which may be set in midgard-php
module from MidCOM.
(Continue reading)


Gmane