Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
375 views
in Technique[技术] by (71.8m points)

autoconf - How does `autoreconf` create m4/ folder?

I hit a problem - and I detected the very strange situation:

  1. I run Docker image locally and run there autoreconf -i and I get correct and robust ./configure script.
  2. Then I run autoreconf -i in the same Docker image but under Gitlab CI. And I get broken ./configure script - some of M4 macro were not substituted to their shell code, so Bash cannot execute them and treats them as syntax errors.

The difference is in m4/ folder in the both runs: successful m4/ folder contains files like:

aria2_arg.m4
ax_check_compile_flag.m4
ax_cxx_compile_stdcxx_11.m4
codeset.m4
fallocate.m4
fcntl-o.m4
gettext.m4
... # and so on

but in the failed (Gitlab CI) m4/ folder there are:

gettext.m4
fcntl-o.m4
# ... and so on

and aria2_arg.m4, ax_check_compile_flag.m4, ax_cxx_compile_stdcxx_11.m4, fallocate.m4 and others are missing. I don't know how is it possible if the Docker image is the same in both cases, but... how does autoreconf create m4/ folder? If its content's source is the Docker image itself (I don't know is it true, it's my suggestion only), then why is the content different in both cases?

question from:https://stackoverflow.com/questions/65858308/how-does-autoreconf-create-m4-folder

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

No any magic. The missing m4 files do exist in the original Aria2 Github repository (in m4/) folder. autoreconf -i adds another .m4 files to this folder. But it has .gitignore with .m4 rule. I added it to another git repo (to build it in Gitlab) but m4/ folder was ignored. So:

 Aria2   ->   local folder   ->   run docker ->     OK
Github          with m4/            locally      m4/ exists

works fine, but:

Aria2   ->  another git repo   ->   run Gitlab CI ->      Failure
Github        (now no m4/)                             (.m4 missing)

So, it seems the reason of the problem was - the miss of m4/ in the second git repo (at least I have got the first successful build)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...