Closed fulara closed 4 years ago
I think my perl is too old. This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Not 100% sure yet - not a perl wizard.
I have used instead:
--- bin/autom4te.in 2020-04-21 23:36:48.721502291 +0100
+++ bin/autom4te.in 2020-04-21 23:38:02.767286010 +0100
@@ -268,6 +268,12 @@
if /^\s*(\#.*)?$/;
my @words = shellwords ($_);
+ my @words_clone = @words;
+ @words = ();
+ foreach ( @words_clone ) {
+ push(@words, do { (my $tmp = $_) =~ s#AUTOCONF_M4DIR#$pkgdatadir#; $tmp });
+ }
+
my $type = shift @words;
if ($type eq 'begin-language:')
{
Patch - it seems to work. but if any perl magician laughs at that - i welcome proposals.
i will create pr tomorrow.
Hey @fulara
I didn't know the map
function (or my usage) was relatively new and would break on older perl versions. I'm a bigger perl noob then you, I would say :smile:
Your code looks fine to me! Thanks for your (future) pr!
I am still testing further - however I have a question. I am slightly worried that the changes you have made are not enough. This does not work for me across a different directory structure.
the autom4te.cfg file has hardcoded paths - hence it does not want to work in different build setups.
in my recipes before I have discovered yours I was doing this nasty hackiness, I think this worked:
def package_info...
#uber hacky but maybe works.
# unfortunatelly autom4te.cfg has hardcoded strings.. so we just rewrite them everytime!
self.run("sed -i -r \"s@prepend-include .*@prepend-include '{}'@g\" {}".format(autoconf_dir, cfg))
source: https://github.com/fulara/conan-cracker/blob/master/conanfiles/autoconf/conanfile.py#L57
What do you think - am I doing sth wrong?
I am still testing further - however I have a question. I am slightly worried that the changes you have made are not enough. This does not work for me across a different directory structure.
Can you explain what you mean by different directory structure?
the autom4te.cfg file has hardcoded paths - hence it does not want to work in different build setups.
In 0001-autom4te-relocatable.patch
, I replace all @XXXX@
variables in lib/autom4te.in
(that gets converted to autom4te.cfg
)
in my recipes before I have discovered yours I was doing this nasty hackiness, I think this worked:
The automom4te.cfg
file is only consumed by bin/autom4te
.
That's why I choose to use a regex to replace AUTOCONF_M4DIR
with the correct directory.
What do you think - am I doing sth wrong?
I don't know how to reproduce your problem, so I can't say anything. But looking at the history of your previous comment (ignore what was there - I think my packages got confused.), that may be the case.
When I need to compare 2 packages, I create them using a different user/channel
.
e.g. try to build and use two recipes as autoconf/2.69@cci/stable
and autoconf/2.69@fulara/testing
.
Maybe that will avoid collisions and possible confusion?
Okay, I just failed at making diff, that was the rootcause. Everything works now - thanks for your help, i'll raise pr tmr(!) after i do some more checks.
autoconf package does not build on rh6.
adding Magician @madebr who created original recipes.
I will try to find the rootcause for this magic stuff.
Package and Environment Details (include every applicable attribute)
Conan profile
Steps to reproduce (Include if Applicable)
conan install autoconf 2.69 --build
Logs (Include/Attach if Applicable)
Click to expand log
Some output: ``` chmod a-w autom4te.tmp chmod +x autoscan.tmp chmod a-w ifnames.tmp mv autoheader.tmp autoheader chmod a-w autoreconf.tmp chmod +x autoupdate.tmp mv autom4te.tmp autom4te chmod a-w autoscan.tmp mv ifnames.tmp ifnames mv autoreconf.tmp autoreconf chmod a-w autoupdate.tmp mv autoscan.tmp autoscan mv autoupdate.tmp autoupdate AUTOM4TE_PERLLIBDIR='/var/build/fulara/conan-standalone/.conan/data/autoconf/2.69/_/_/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder'/lib AUTOM4TE_CFG='../lib/autom4te.cfg' ../bin/autom4te -B '..'/lib -B '/var/build/fulara/conan-standalone/.conan/data/autoconf/2.69/_/_/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder'/lib --language M4sh --cache '' --melt /var/build/fulara/conan-standalone/.conan/data/autoconf/2.69/_/_/build/44fcf6b9a7fb86b2586303e3db40189d3b511830/source_subfolder/bin/autoconf.as -o autoconf.in Bareword found where operator expected at ../bin/autom4te line 271, near "s#AUTOCONF_M4DIR#$pkgdatadir#r" syntax error at ../bin/autom4te line 271, near "s#AUTOCONF_M4DIR#$pkgdatadir#r" BEGIN not safe after errors--compilation aborted at ../bin/autom4te line 312. ```