Login or Sign up with: More »
Home Search Stats FAQ Feedback
You are here: { Home / issue: Recreate build files };
+Sponsor new issue +Propose new issue

[ Issue ] 3: Recreate build files

  • Description
  • Sponsors (1)
  • Developers (1)

Build files and Makefiles are too complex. Support to autoconf, automake or alternative tools should be added in a way that:
- Anyone that wants to build the project would know how to do it without needing to read a manual
- it would be easy to configure the build for several different environments
- it would be easy to generate several compiled distro packages to several environments
- it would automatically increase build number (version)
- The generated distro file would be easy to download and run. The person wanting it should just install the dependencies and start using Locke

jeremiahdodds

I'll take a look at it, I've been meaning to learn my way around the autotools more anyhow.

Wed, 25/Jul/2012
Permalink

mvallebr

That's great! Please let me know if you have any doubts.
It's important that the “DIST” target works well, as the dist should become the tar ball to be distributed. When a person gets the tarball, he/she should be able to run ./configure && make to have locke working with the glib found in their system. It's important also to check the correct glib version.
make install target would be great, even specific for some system.

Wed, 25/Jul/2012
Permalink

jeremiahdodds

It's been going alright so far, I'm working on it in my freeish time, and am starting to feel like I'm starting to grok the autotools now :) So far I seem to have the server/{api,src} builds working, and I also updated the docs build to auto-insert the correct version number

Autotools creates dist and install targets by default (and a bunch of other “every project wants this” targets), which should indeed allow the user to run ./configure && make, and checks for libraries and dependencies are handled and all that.

In the original makefiles, you're using pkg-config to check for glib and friends, I'm doing the same (pkg-config integrates with autotools). Is there a specific version, other than 2.0.0 for those libs that should be considered the correct minimum version?.

Thu, 26/Jul/2012
Permalink

jeremiahdodds

Ok, I've gotten it as far as I can get it, I think. My work is in a github branch, https://github.com/jdodds/Locke/tree/autotools if you'd like to check it out.

From a fresh git checkout, run 'autoreconf -i', and then the ./configure,make dance works as expected, with one major caveat:

Your source makes references to the current directory, autotools and friends expects that programs won't do that, as they tend to be installed in different places on different machines – there are “standard” directories for things like shared libraries and executables, and data that gets changed as the program is run. I don't know enough about how these are normally accessed from C to know how to update the source to utilize them at the moment, I assume it's probably a matter of using a generated #define construct instead of hard-coding the dirs in, and would probably be a minor change for someone more versed in autotools and C than I.

It's definitely a desirable change, especially if you want to be as portable as possible, it's just outside my level of lore at the moment :(

Tue, 31/Jul/2012
Permalink

mvallebr

Jeremiah, I won't get time to check this until the weekend, but be sure I am eager to check.
In the weekend, I will give you feedback, ok?
and thanks in advance!

Tue, 31/Jul/2012
Permalink

jeremiahdodds

No problem!

Tue, 31/Jul/2012
Permalink

mvallebr

Hello, sorry, I forgot to look at the weekend! :S
To much work.
Will take a look now!

Wed, 08/Aug/2012
Permalink

mvallebr

Jeremiah,

I am far from my computer this month and I am only being able to run it using cygwin, at work. What are the instruction?
I downloaded your branch and as there was no configure or autogen.sh, I installed autoconf 2.69 and automake 1.12 and tried “autoconf” inside the project directory. It generated a configure file, but when I tried to run it I got the following error:

./configure
./configure: line 2183: syntax error near unexpected token -Wall'
./configure: line 2183:
AM_INIT_AUTOMAKE(-Wall -Werror foreign)'

No idea of what I may be doing wrong…

Wed, 08/Aug/2012
Permalink

tonylampada

Hey, I'm glad to see that there's work in progress on FS already! :-)

Please see
https://github.com/freedomsponsors/www.freedomsponsors.org/issues/20

Fri, 10/Aug/2012
Permalink

tonylampada

Emails should be fixed now. Let's see.

Sun, 12/Aug/2012
Permalink

jeremiahdodds

MarceloElias, the instructions were in my above comment:

“From a fresh git checkout, run 'autoreconf -i', and then the ./configure,make dance works as expected”

Mon, 13/Aug/2012
Permalink

mvallebr

Still getting some issues… But it might be problem of my setup.
Do you have some link or manual I could refer to, so I can try to solve this myself? I will try in my linux at the weekend

$ ./configure
./configure: line 2183: syntax error near unexpected token -Wall'
./configure: line 2183:
AM_INIT_AUTOMAKE(-Wall -Werror foreign)'

Mon, 13/Aug/2012
Permalink

mvallebr

Jeremiah, could you please Mark this as solved? FS won't let me pay otherwise and I think you have done a lot already for 30 bucks! :D
From now on, I think I should be able to continue myself.
I still wait for your answer about the manual, but thanks a lot for the good experience with this, I will hire more things in the future for sure!

Mon, 13/Aug/2012
Permalink

jeremiahdodds

Sure thing! Glad to be of help, and I wish that I was versed enough to get everything spic an span.

The only other dependency I can think of that you should need is libtool, but that's normally there as part of the autotools chain – then again, I never could get cygwin to play nice (I always ended up just running a linux in a VM – that's definitely not a viable solution for everyone though). I think libtool should do the right thing when building under cygwin, removing the need for the flag that was there before, but I can't test it.

FWIW, I have:
autoconf 2.69
automake 1.12.2
libtool 2.4.2

The best documentation for the autotools is the official docs, located at http://www.gnu.org/software/autoconf/manual/autoconf.html and http://www.gnu.org/software/automake/manual/automake.html – it took me a bit of immersion to be able to start to grok the different parts, it's a notoriously “complicated, but the best we've got in that area” toolset.

Again, I'm glad to have helped out, and if I can I'll continue to do so!

Mon, 13/Aug/2012
Permalink

jeremiahdodds

Marking resolved as per MarceloElias' request.

Mon, 13/Aug/2012
Permalink

tonylampada

YAY, first payment :-).
That's awesome. Thanks for using FS guys.

Seeing the complete cycle run for the first time has allowed me detect a few improvements and minor bugs that need fixing.
I'll add them to the Github list. If any of you feel like adding more items to the list, please do so!

Thanks again

Mon, 13/Aug/2012
Permalink
Sponsor
Offer
Acceptance
Status
Date
Expire Date
mvallebr

US$ 30.00

No forking
Release required
[More...]

PAID

Jul/16/2012

{[{ current_offer.author }]}'s acceptance criteria
Close
Developer
Status
Date
jeremiahdodds

DONE / Accepting payments

Wed, 25/Jul/2012

Overview

Locke
linefix

Sponsor this issue Work on this issue
{[{ actionmodal.title }]}
Offer value:
in Days

FreedomSponsors will charge a 3% fee on top of your payment. For offers in US$, Paypal's fees will also apply. Learn more!

Cancel {[{ actionmodal.buttonlabel }]}
Created by
mvallebr

Help fund this issue. Share on:

FAQ Developers Project list Facebook JavaScript license information FreedomSponsors, Copyright © 2012-2013