Bug 4081 - Build system: Not building outside /source
Build system: Not building outside /source
Status: RESOLVED FIXED
Product: Samba 4.0
Classification: Unclassified
Component: Build
unspecified
Other All
: P3 normal
: ---
Assigned To: Andrew Tridgell
samba4-qa@samba.org
http://gitweb.samba.org/samba.git/?p=...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-05 11:46 UTC by Simo Sorce
Modified: 2010-10-01 08:34 UTC (History)
2 users (show)

See Also:


Attachments
simple build script (1.73 KB, text/plain)
2006-09-06 08:10 UTC, Gerald (Jerry) Carter
no flags Details
Corrected "Makefile" (1.08 KB, patch)
2008-05-23 10:10 UTC, Matthias Dieter Wallnöfer
no flags Details
Corrected "rules.mk" (422 bytes, patch)
2008-05-23 10:27 UTC, Matthias Dieter Wallnöfer
no flags Details
An improved version of the build script (1.55 KB, text/plain)
2008-05-23 12:59 UTC, Matthias Dieter Wallnöfer
no flags Details
Readme for build system (727 bytes, patch)
2008-05-23 13:31 UTC, Matthias Dieter Wallnöfer
no flags Details
Corrected "main.mk" (4.64 KB, patch)
2008-05-23 14:54 UTC, Matthias Dieter Wallnöfer
no flags Details
Proposed version of "config_mk.pm" (1.84 KB, patch)
2008-05-23 15:38 UTC, Matthias Dieter Wallnöfer
no flags Details
Corrected "config.mk" of Heimdal (1.03 KB, patch)
2008-05-23 15:59 UTC, Matthias Dieter Wallnöfer
no flags Details
Build script (1.55 KB, text/plain)
2008-09-14 13:58 UTC, Matthias Dieter Wallnöfer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simo Sorce 2006-09-05 11:46:21 UTC
Samba4 seem to not be building anymore outside /source
Comment 1 Gerald (Jerry) Carter 2006-09-06 08:08:37 UTC
Using svn rev 18181:

Creating /misc/src/build/4.0.0/client
Creating /misc/src/build/4.0.0/client/.svn
Creating /misc/src/build/4.0.0/client/.svn/text-base
Creating /misc/src/build/4.0.0/client/.svn/prop-base
Creating /misc/src/build/4.0.0/client/.svn/props
Creating /misc/src/build/4.0.0/client/.svn/wcprops
Creating /misc/src/build/4.0.0/client/.svn/tmp
Creating /misc/src/build/4.0.0/client/.svn/tmp/text-base
Creating /misc/src/build/4.0.0/client/.svn/tmp/prop-base
Creating /misc/src/build/4.0.0/client/.svn/tmp/props
Creating /misc/src/build/4.0.0/client/.svn/tmp/wcprops
cp: cannot stat `/home/drizzt/jerry/bzr/samba/SAMBA_4_0/source/include/smb.h': No such file or directory
Argument ".main.mk' nor `./main.mk'\n" isn't numeric in division (/) at /home/drizzt/jerry/bzr/samba/SAMBA_4_0/source/build/smb_build/config_mk.pm line 138.
Argument "Can't open neither `.." isn't numeric in division (/) at /home/drizzt/jerry/bzr/samba/SAMBA_4_0/source/build/smb_build/config_mk.pm line 138.
Illegal division by zero at /home/drizzt/jerry/bzr/samba/SAMBA_4_0/source/build/smb_build/config_mk.pm line 138.
configure failed.  Exiting....
Comment 2 Gerald (Jerry) Carter 2006-09-06 08:10:06 UTC
Created attachment 2127 [details]
simple build script

Normally run with these steps....

$ cd $HOME/src/samba-4-0/source && ./autogen.sh
$ mkdir /misc/src/build/4.0.0
$ cd /misc/src/build/4.0.0
$ build-samba $HOME/src/samba-4-0/source
Comment 3 Alexander Bokovoy 2006-09-07 12:29:11 UTC
I need to rework ac_abs_*dir part to take those variables correctly early in configure stage.
Comment 4 Matthias Dieter Wallnöfer 2007-08-25 07:43:33 UTC
Isn't this bug obsolete now? It seems that this is now handled correctly!
Comment 5 Matthias Dieter Wallnöfer 2007-08-27 03:08:53 UTC
It seems that this have been fixed.
Comment 6 Andrew Bartlett 2007-08-27 05:23:33 UTC
I just tried the supplied script, and it failed.  Building to tools to use (asn1_compile etc) makes this rather tricky...
Comment 7 Matthias Dieter Wallnöfer 2008-05-23 09:57:20 UTC
This is a problem regarding the build system, so I assign it to Jelmer.
The problem is caused due to the partial lack of absolute path names in the makefiles.
Comment 8 Matthias Dieter Wallnöfer 2008-05-23 10:10:45 UTC
Created attachment 3305 [details]
Corrected "Makefile"
Comment 9 Matthias Dieter Wallnöfer 2008-05-23 10:27:09 UTC
Created attachment 3306 [details]
Corrected "rules.mk"
Comment 10 Jelmer Vernooij 2008-05-23 12:26:28 UTC
I've applied your patches with some minor modifications. I doubt this fixes out-of-tree builds completely though, does it?
Comment 11 Jelmer Vernooij 2008-05-23 12:26:37 UTC
I've applied your patches with some minor modifications. I doubt this fixes out-of-tree builds completely though, does it?
Comment 12 Matthias Dieter Wallnöfer 2008-05-23 12:56:50 UTC
No, it doesn't fix it completely. It's a start.
Comment 13 Matthias Dieter Wallnöfer 2008-05-23 12:59:43 UTC
Created attachment 3307 [details]
An improved version of the build script
Comment 14 Matthias Dieter Wallnöfer 2008-05-23 13:31:49 UTC
Created attachment 3308 [details]
Readme for build system

Removed the reference to "configure.in" in the readme file for the SAMBA 4build system.
Comment 15 Matthias Dieter Wallnöfer 2008-05-23 14:54:11 UTC
Created attachment 3309 [details]
Corrected "main.mk"

This introduces the "srcdir" environment variable.
Comment 16 Matthias Dieter Wallnöfer 2008-05-23 15:38:48 UTC
Created attachment 3310 [details]
Proposed version of "config_mk.pm"

I propose the remotion of the "for" loop to search the makefile snippets either in the build or source dir, because the "open" calls generate a lot of warnings.
The "main.pl" also prints out some warnings about an uninitialized string in line 58, but I haven't discovered the reason.
Comment 17 Matthias Dieter Wallnöfer 2008-05-23 15:59:48 UTC
Created attachment 3311 [details]
Corrected "config.mk" of Heimdal
Comment 18 Matthias Dieter Wallnöfer 2008-05-24 07:37:58 UTC
Okay, now with my patches applied, "make" invoked with the build script reaches the state where the partial builded objects are made. The first seems to be "replace_hostcc.o". But I've no idea where to change there the path (I've only found an entry in "data.mk" which is autogenerated).
Comment 19 Matthias Dieter Wallnöfer 2008-05-27 16:37:12 UTC
Comment on attachment 3311 [details]
Corrected "config.mk" of Heimdal

Applied
Comment 20 Matthias Dieter Wallnöfer 2008-09-14 13:58:14 UTC
Created attachment 3579 [details]
Build script

- Removed one of the two invocations of "make"
Comment 21 Matthias Dieter Wallnöfer 2008-12-20 12:50:36 UTC
Comment on attachment 3308 [details]
Readme for build system

I've been wrong here. The original is correct.
Comment 22 Matthias Dieter Wallnöfer 2009-12-15 10:14:52 UTC
Jelmer, does your new build system change something regarding this bug? Does it finally support the relative paths fully?
Comment 23 Matthias Dieter Wallnöfer 2010-04-08 07:15:42 UTC
I've pushed a fix which finally allows us to do the build invoke from the outside of "source4" using the new WAF buildsystem. See: http://gitweb.samba.org/samba.git/?p=samba.git;a=commit;h=f3f82496ac1198ffa65d5b2a052838248e0685aa

Marking this as "FIXED".
Comment 24 Jelmer Vernooij 2010-05-25 15:59:50 UTC
From what I understand we still don't support this properly, even with the waf build.
Comment 25 Jelmer Vernooij 2010-06-02 06:56:11 UTC
I can't really unassign, but I guess tridge is the best assignee for the waf build.
Comment 26 Matthias Dieter Wallnöfer 2010-06-02 11:14:31 UTC
Comment on attachment 3310 [details]
Proposed version of "config_mk.pm"

Well, I really think it matters how the reporter has thought it at the beginning.
So it would be nice if Simo could explain his satisfaction in combination with my solution.
Otherwise I really prefer to close this issue.
Comment 27 Simo Sorce 2010-06-02 12:56:46 UTC
(In reply to comment #26)
> (From update of attachment 3310 [details])
> Well, I really think it matters how the reporter has thought it at the
> beginning.
> So it would be nice if Simo could explain his satisfaction in combination with
> my solution.
> Otherwise I really prefer to close this issue.

The request is to be able to build in a directory like source4/mybuild without anything changing outside of this directory.

If that has been achieved the bug is fixed, otherwise it isn't.

The reason is that this way I can do multiple builds with different build options w/o any one of them interfering with any other.

Simo.


Comment 28 Matthias Dieter Wallnöfer 2010-06-03 04:41:02 UTC
Well, so do you think that my patch doesn't fit your needs, Simo? You can keep various copies in various directories which don't interfer each other and you can do the build from outside of the "source4" directories (see my commit comment which is referenced by the URL).
Comment 29 Matthias Dieter Wallnöfer 2010-06-19 04:03:53 UTC
Tridge, it would be really nice to hear your opinion here. In my eyes this is fixed with my commit (URL).
Comment 30 Matthias Dieter Wallnöfer 2010-10-01 08:34:50 UTC
Well, I close this until I hear another argument.