Skip to contentSkip to conversation

do not use --symlink for autoreconf

PATCH In review Andre Naujoks 2 participants 12 messages Jul 2, 2014 CAN network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 do not use --symlink for autoreconf

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

---
 autogen.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
autogen.sh +1 -1
index 29db9c9..6d1c20a 100755
@@ -17,6 +17,6 @@ banner() {
 
 banner "autoreconf"
 
-autoreconf --force --install --symlink -Wall || exit $?
+autoreconf --force --install -Wall || exit $?
 
 banner "Finished"
Signature · 1 line
2.0.1
#1 lore raw
Quoted 7 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

How do you package the can-utils? The usual steps are:

./autogen.sh
./configure
make dist

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#2 lore raw
Quoted 7 lines · Marc Kleine-Budde
Quoted 6 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 5 lines
Quoted 1 line

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

I was not aware of the dist target. Why do I have to configure before creating the dist? Isn't the configure step just for adaptations for the build-host and target?

Andre

Quoted 3 lines

Marc

#3 lore raw
Quoted 10 lines · Andre Naujoks
Quoted 9 lines · Marc Kleine-Budde
Quoted 7 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 8 lines
Quoted 3 lines

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

Quoted 11 lines

I was not aware of the dist target. Why do I have to configure before creating the dist? Isn't the configure step just for adaptations for the build-host and target?

Andre

Quoted 3 lines

Marc

#4 lore raw
Quoted 15 lines · Andre Naujoks
Quoted 14 lines · Andre Naujoks
Quoted 12 lines · Marc Kleine-Budde
Quoted 7 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

Quoted 7 lines
Quoted 4 lines

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#5 lore raw
Quoted 18 lines · Marc Kleine-Budde
Quoted 17 lines · Andre Naujoks
Quoted 16 lines · Andre Naujoks
Quoted 7 lines · Marc Kleine-Budde
Quoted 6 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 5 lines
Quoted 1 line

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Try something like this instead (untested, though):

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar
cd $project
./autogen.sh
cd ..
tar -rhf $project.tar \
$project/GNUmakefile.in $project/aclocal.m4 $project/autom4te.cache/ $project/config/autoconf/ $project/config/m4/libtool.m4 $project/config/m4/ltoptions.m4 $project/config/m4/ltsugar.m4 $project/config/m4/ltversion.m4 $project/config/m4/lt~obsolete.m4 $project/configure

From tar's man-page:
-r, --append
append files to the end of an archive
-h, --dereference
follow symlinks; archive and dump the files they point to

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#6 lore raw
Quoted 38 lines · Marc Kleine-Budde
Quoted 18 lines · Marc Kleine-Budde
Quoted 17 lines · Andre Naujoks
Quoted 16 lines · Andre Naujoks
Quoted 7 lines · Marc Kleine-Budde
Quoted 6 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 5 lines
Quoted 1 line

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Try something like this instead (untested, though):

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar
cd $project
./autogen.sh
cd ..
tar -rhf $project.tar \
$project/GNUmakefile.in $project/aclocal.m4

Quoted 8 lines

$project/autom4te.cache/
$project/config/autoconf/
$project/config/m4/libtool.m4
$project/config/m4/ltoptions.m4
$project/config/m4/ltsugar.m4
$project/config/m4/ltversion.m4
$project/config/m4/lt~obsolete.m4
$project/configure

gzip -9 $project.tar

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#7 lore raw
In reply to Marc Kleine-Budde
Quoted 29 lines · Marc Kleine-Budde
Quoted 18 lines · Marc Kleine-Budde
Quoted 17 lines · Andre Naujoks
Quoted 16 lines · Andre Naujoks
Quoted 7 lines · Marc Kleine-Budde
Quoted 6 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 5 lines
Quoted 1 line

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Try something like this instead (untested, though):

Quoted 10 lines

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar
cd $project
./autogen.sh
cd ..
tar -rhf $project.tar \
$project/GNUmakefile.in $project/aclocal.m4 $project/autom4te.cache/

          ^^^^^^^^^^^^^^^^^^^^^^^^

Doh! You don't want to package this. Copy/Paste error.

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#8 lore raw
Quoted 30 lines · Marc Kleine-Budde
Quoted 29 lines · Marc Kleine-Budde
Quoted 27 lines · Marc Kleine-Budde
Quoted 16 lines · Andre Naujoks
Quoted 15 lines · Andre Naujoks
Quoted 13 lines · Marc Kleine-Budde
Quoted 8 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

Quoted 8 lines
Quoted 5 lines

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Quoted 8 lines
Quoted 7 lines

Try something like this instead (untested, though):

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar cd $project ./autogen.sh cd .. tar -rhf $project.tar \
$project/GNUmakefile.in $project/aclocal.m4 $project/autom4te.cache/

^^^^^^^^^^^^^^^^^^^^^^^^

This is all nice and all, and I appreciate it, but why is the --symlink parameter there in the first place? I see no benefit from using it. It just makes things harder if you do it "the normal way".

Another thing is, that you need a host with all build dependencies resolved (i.e. configure completes) just to generate an unbuild package. This might not be a problem now (or ever), but why put in such a pitfall, when it is not needed?

Andre

Quoted 5 lines

Doh! You don't want to package this. Copy/Paste error.

Marc

#9 lore raw
Quoted 38 lines · Andre Naujoks
Quoted 37 lines · Marc Kleine-Budde
Quoted 36 lines · Marc Kleine-Budde
Quoted 19 lines · Marc Kleine-Budde
Quoted 18 lines · Andre Naujoks
Quoted 17 lines · Andre Naujoks
Quoted 8 lines · Marc Kleine-Budde
Quoted 7 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 5 lines
Quoted 1 line

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Try something like this instead (untested, though):

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar cd $project ./autogen.sh cd .. tar -rhf $project.tar \
$project/GNUmakefile.in $project/aclocal.m4 $project/autom4te.cache/

Quoted 5 lines
Quoted 1 line

^^^^^^^^^^^^^^^^^^^^^^^^

This is all nice and all, and I appreciate it, but why is the --symlink parameter there in the first place? I see no benefit from using it. It just makes things harder if you do it "the normal way".

Yes, I think the autotools/git interaction can be improved.

Quoted 4 lines

Another thing is, that you need a host with all build dependencies resolved (i.e. configure completes) just to generate an unbuild package. This might not be a problem now (or ever), but why put in such a pitfall, when it is not needed?

For now I've applied your patch.

Thanks,
Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |
#10 lore raw
Quoted 49 lines · Marc Kleine-Budde
Quoted 41 lines · Andre Naujoks
Quoted 40 lines · Marc Kleine-Budde
Quoted 39 lines · Marc Kleine-Budde
Quoted 25 lines · Marc Kleine-Budde
Quoted 24 lines · Andre Naujoks
Quoted 22 lines · Andre Naujoks
Quoted 9 lines · Marc Kleine-Budde
Quoted 8 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 6 lines
Quoted 1 line

How do you package the can-utils? The usual steps
are:

./autogen.sh ./configure make dist

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

Quoted 5 lines
Quoted 3 lines

... after which I unpack, autogen.sh and repack. Which is probably not the sanest way of doing this, but should work.

This is why you get the problems with the links....

Try something like this instead (untested, though):

project=can-utils-git describe --always --dirty git archive --prefix=$project/ -o $project.tar HEAD tar xf $project.tar cd $project ./autogen.sh cd .. tar -rhf $project.tar \ $project/GNUmakefile.in $project/aclocal.m4 $project/autom4te.cache/

Quoted 6 lines
Quoted 1 line

^^^^^^^^^^^^^^^^^^^^^^^^

This is all nice and all, and I appreciate it, but why is the --symlink parameter there in the first place? I see no benefit from using it. It just makes things harder if you do it "the normal way".

Quoted 8 lines

Yes, I think the autotools/git interaction can be improved.

Quoted 4 lines

Another thing is, that you need a host with all build dependencies resolved (i.e. configure completes) just to generate an unbuild package. This might not be a problem now (or ever), but why put in such a pitfall, when it is not needed?

For now I've applied your patch.

Great! Thank you. :-)

Quoted 3 lines

Thanks, Marc

#11 lore raw
In reply to Andre Naujoks
Quoted 10 lines · Andre Naujoks
Quoted 9 lines · Marc Kleine-Budde
Quoted 7 lines · Andre Naujoks

When packaging the can-utils, I understand, that the generation step for autoconf should be done beforehand. However using the --symlink option in the autoreconf step installs links instead of the actual files, which leads to a build failure when trying to build on another host with different autotools installed.

Quoted 8 lines
Quoted 3 lines

How do you package the can-utils? The usual steps are:

./autogen.sh ./configure make dist

with git archive. Something like

git archive --prefix=can-utils-git describe --always --dirty/ -o can-utils-git describe --always --dirty.tar.gz HEAD

AFAIK: git will not archive any files that are not in git, thus no files generated by autoconf.sh.

Quoted 3 lines

I was not aware of the dist target. Why do I have to configure before creating the dist? Isn't the configure step just for adaptations for the build-host and target?

Usually you're right, but wihtout the autogen.sh && ./configure run, there are no makefiles that contian the code for make dist. Note: the can-utils package hold a handcraftet Makefile for the people who don't like autotools. And autotools will generate GNUmakefile, which has a higher priority for gnu make.

Marc

Signature · 4 lines
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |