Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit 992d5c6d0f1b1891e7b1b906e7d45f0792abe96f breaks out of source builds #109

Closed
ghost opened this issue May 8, 2016 · 20 comments
Closed
Labels

Comments

@ghost
Copy link

ghost commented May 8, 2016

the title tells

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

I'm afraid the title doesn't tell me all.

What does "breaks out of source builds" mean?

@ghost
Copy link
Author

ghost commented May 8, 2016

out of source builds mean building in a different directory than the source,

out of source builds will not pollute the source directory
out of source builds allow to test cleanly different configure options

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

Okay. How does one do that? I'd like to try it for myself so see what the problem is. Unless you can tell me. Can you explain where (what) the problem is? Help me out here, Enrico! I'm not used to doing "out of source" builds!   :)

@ghost
Copy link
Author

ghost commented May 8, 2016

supposing that
hyperion.git is the source directory

cd to reach hyperion.git
bash autogen.sh

after that
cd .. ( back out one level )
mkdir hyperion.bin
cd hyperion.bin
../hyperion.git/configure ... ... ...
make

I looked at Makefile.am
and it seems that it should be enough to plug into
DYNAMIC_VERSION := $(shell ./_dynamic_version)
the top_srcdir

but i really do not know how

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

Ah. Okay. I understand now. Thank you.

Yes, I believe you may be correct. Let me try it (play around with it for a while) on my CentOS system and I'll get back to you. Thanks for reporting it.

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

I think I've explained this several times.

mkdir build

Sourcedir/configure --prefix=run_dir

make

make install

(It's called VPATH support in autoconf)

Here is a copy of my build script :


rep=$1
dst=$2
a=~

src=$a/hercules/src/$rep
bld=$a/hercules/build/$dst
run=$a/hercules/run/$dst

cd $src
sh ./autogen.sh

cd $a/hercules/build
rm -rf $dst
mkdir $dst
cd $dst

$src/configure --prefix=$run --enable-optimization="-O3
-fomit-frame-pointer"
make -j 10
make install


At which point I can run hercules by adding ~/hercules/run/$dst/bin in
the PATH... (say I add /home/ivan/hercules/run/hy-clang/bin to my path
after running "./buildit hyperion hy-clang")

--Ivan

Le 08/05/2016 à 03:00, Fish-Git a écrit :

Okay. How does one do that? I'd like to try it for myself so see what
the problem is. Unless you can tell me. Can you explain where (what)
the problem is? Help me out here, Enrico! I'm not used to doing "out
of source" builds! |:)|


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#109 (comment)

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Fish,

Complete support should also ensure that you can build from a source
package built from "make dist" (which creates a pre-digested tarball
(that is without a need to run autogen.sh and with version information
being fixed without needing access to a source repository) and that the
resulting package also supports VPATH.

--Ivan

Le 08/05/2016 à 03:38, Fish-Git a écrit :

Ah. Okay. I understand now. Thank you.

Yes, I believe you may be correct. Let me try it (play around with it
for a while) on my CentOS system and I'll get back to you. Thanks for
reporting it.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#109 (comment)

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

Cool! Thanks Ivan! I'll have to give that a try too!

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

Complete support should also ensure that you can build from a source
package built from "make dist" (which creates a pre-digested tarball
(that is without a need to run autogen.sh and with version information
being fixed without needing access to a source repository) and that the
resulting package also supports VPATH.

I don't know how to do that.  :(

I'm just trying to do the best I can on Linux, but I'm obviously no expert at it (understatement of the century). I'm relying on you guys to help me out in that regard.

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Le 08/05/2016 à 03:46, Fish-Git a écrit :

Complete support should also ensure that you can build from a source
package built from "make dist" (which creates a pre-digested tarball
(that is without a need to run autogen.sh and with version information
being fixed without needing access to a source repository) and
that the
resulting package also supports VPATH.

I don't know how to do that. |:(|

I'm just /trying/ to do the best I can on Linux, but I'm obviously no
expert at it (understatement of the century). I'm relying on /you/
guys to help me out in that regard.


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#109 (comment)

Fish,

I will do my best to help you ! This can be discussed on the google
groups herc-devel list I guess. (and if it requires more intense
discussion, off-list or even on the phone.. PS my phone number has
changed - so if you need it, I will give it off-list).

--Ivan

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

I looked at Makefile.am
and it seems that it should be enough to plug into
DYNAMIC_VERSION := $(shell ./_dynamic_version)
the top_srcdir

I suspect some changes to the _dynamic_version script might probably be needed too. I think I coded it to presume the current directory was the source code directory.

It might be a while (how long I don't know) before I figure this out but I'm looking into it folks!

In the mean time if you have any ideas/suggestions let me know. (*)

Thanks!

(*) In the hercules-devel group per Ivan's request.

@jphartmann
Copy link
Contributor

I've been building outside the source directory "forever". I even have multiple architectures on a BSD server, one object directory for each.

To run out of the bin directory I do this after "make": "./hercules" this deals with the autolib script. I also set LD_LIBRARY_PATH to ./libs in addition to setting PATH as Ivan already described.

@Fish-Git Fish-Git added the BUG label May 8, 2016
@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

That was easy!  :)

I used Ivan's provided script further above to test with. Works great now!

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Negative sarge ! I am getting a fail to build :

In file included from /home/ivan/hercules/src/hyperion/hsys.c:12:
In file included from /home/ivan/hercules/src/hyperion/hercules.h:116:
/home/ivan/hercules/src/hyperion/version.h:19:10: fatal error: '_dynamic_version.h' file not found
#include "_dynamic_version.h" /* created by _dynamic_version script /
^
1 error generated.
Makefile:2095: recipe for target 'hsys.lo' failed
make[1]: *
* [hsys.lo] Error 1

(This is complete rebuild using the aformentioned script after a git pull (5/6/2016 18:07 GMT) - autogen.sh and configure has been run).

I'll look if it's something obvious or if it is something I missed on my side (although it's using the script that has been working for like - ever)... But since you're on the it, it's probably going to be easier for you (I have no idea what technics are used there - so going to have to reverse engineer everything for this issue).

--Ivan

@ghost
Copy link
Author

ghost commented May 8, 2016

Unfortunately it still does not work on APPLE

autogen works
configure works
make chokes

[enrico@Enrico-iMac hyperion.test]$make V=0
make: ./_dynamic_version: Command not found
/Applications/Xcode.app/Contents/Developer/usr/bin/make all-recursive
make[1]: ./_dynamic_version: Command not found
Making all in decNumber
CC decContext.lo
CC decimal128.lo
CC decimal32.lo
CC decimal64.lo
CC decNumber.lo
CC decPacked.lo
CCLD libdecNumber.la
Making all in m4
make[2]: Nothing to be done for all'. Making all in util make[2]: Nothing to be done forall'.
Making all in html
make[2]: Nothing to be done for all'. Making all in man make[2]: Nothing to be done forall'.
Making all in .
make[2]: ./_dynamic_version: Command not found
CC hsys.lo
In file included from /Users/enrico/Hercules/hyperion.git.test/hsys.c:12:
In file included from /Users/enrico/Hercules/hyperion.git.test/hercules.h:116:
/Users/enrico/Hercules/hyperion.git.test/version.h:19:10: fatal error: '_dynamic_version.h' file not found
#include "_dynamic_version.h" /* created by _dynamic_version script /
^
1 error generated.
make[2]: *
* [hsys.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

the current working directory is the out of source directory
an NO _dynamic_version is there

have a good time
enrico

On 08 May 2016, at 18:55, Fish-Git notifications@github.com wrote:

That was easy! :)

I used Ivan's provided script further above to test with. Works great now!


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #109 (comment)

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Did someone forget to commit ? (Just weeding out the obvious)

--Ivan

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Shouldn't it be

DYNAMIC_VERSION := $(shell $(top_srcdir)/_dynamic_version $(top_srcdir))

On line 15 of makefile.am ? (When building out of the source dir - all files that are in the source dir should be explcit. (Although I'm a little concerned about the parens).

--Ivan

@ghost
Copy link
Author

ghost commented May 8, 2016

On 08 May 2016, at 19:19, ivan-w notifications@github.com wrote:

Shouldn't it be

DYNAMIC_VERSION := $(shell $(top_srcdir)/_dynamic_version $(top_srcdir))

On line 15 of makefile.am ?

--Ivan


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #109 (comment)
Yes
tested and working and committed
cheers
enrico

@ivan-w
Copy link
Contributor

ivan-w commented May 8, 2016

Signoff : Ivan Warren - Out of source build works as designed

@Fish-Git
Copy link
Contributor

Fish-Git commented May 8, 2016

THANK YOU, Enrico! I totally missed that.

And I too can add my conformation that from-outside-of-the-source-directory and from-within-the-source-directory builds -- as well as the "-modified" issue too -- are all working just fine now.

I really appreciate your patience with me guys! Thanks for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants