Bug #7194

artmod does not work as expected with perl 5.18

Added by Lynn Garren over 6 years ago. Updated over 4 years ago.

Target version:
Start date:
Due date:
% Done:


Estimated time:
SSI Package:


Yosemite (not yet supported at Fermilab) comes with perl 5.18. There is some problem with artmod and the newer release of perl.

Communication between Tracy and Chris is below.

Re: artmod build issue.eml
Re: artmod build issue
"Usher, Tracy L." <>
10/21/14 10:59 AM
Chris Green <>

Hi Chris,
I am a bit confused, I assumed the #!/usr/bin/perl in the artmod file gets the default version of perl running on my mac? For sure the artmod script in larsoft-v03_00_00, which is identical to the one in larsoft-v03_03_00, runs fine under mavericks so probably it is some sort of perl issue. I’m not sure which version of perl I had on Mavericks but the version I’m running right now is v5.18.2 which is what was installed under Yosemite. I looked at the perl website but did not see release notes but do note that I could try a newer version of perl if that might make a difference.
I did take out the %c line but do get the same result. Basically, it is inserting the replacement string rather than replacing it. And this seems to be right at this line:

$$bp =~ s&\Q${found_exp}\E\G&${replacement_exp}&;

And, of course, that is all perl to me.
Can try any suggestions. Thanks!


On Oct 20, 2014, at 9:06 PM, Chris Green <> wrote:


First thing to examine is if there are any differences at all between artmod on the mac and artmod in the same version of cetpkgsupport on Linux.

Next, edit your version of artmod to remove the %c from the generated header and see if the replacement of %ty gets hung up.

Also, please verify that the correct version of perl (from UPS) is in your PATH.


On 10/20/14, 10:57 PM, Usher, Tracy L. wrote:

Ok, last email, I promise…

It looks like the issue is here:
my $replacement_exp = $found_exp;
$replacement_exp =~ s&(.?)%${lc}&${1}${wanted_data}&;
$$bp =~ s&\Q${found_exp}\E\G&${replacement_exp}&;
pos $$bp = $s + length($replacement_exp);

For some reason it is inserting the new text, not replacing. So, if you put in some print statements to print the value of bp at the end of each loop it goes something like:

// Class: %c
// Module Type: %t
// File: %f
// Generated at %d by %U using artmod
// from %p %v.

// Class: ToolsTestProducer %c
// Module Type: %t
// File: %f
// Generated at %d by %U using artmod
// from %p %v.

// Class: ToolsTestProducer ToolsTestProducer %c
// Module Type: %t
// File: %f
// Generated at %d by %U using artmod
// from %p %v.

// Class: ToolsTestProducer ToolsTestProducer ToolsTestProducer %c
// Module Type: %t
// File: %f
// Generated at %d by %U using artmod
// from %p %v.


As I said, I’ve no idea how to decipher the perl expressions so no idea why it stopped working on OS X 10.10 vs 10.9.


On Oct 20, 2014, at 8:07 PM, Usher, Tracy L. <> wrote:

Ok, I tracked it down a bit further… it turns out that the while loop in the sub ins_vals is infinite. I know —zero— about perl (coming from a windows background) so the expressions there are, well, perl to me. But for some reason it seems that it never advances past the first line where it does find the %c. (all this done by inserting “print” statements).
Any suggestions are appreciated!


On Oct 20, 2014, at 4:31 PM, Usher, Tracy L. <> wrote:

Not sure if any of this is useful info or not… while executing one of the perl scripts is accessing the following:


and I’ve attached the log file up to the point where I did a ctrl-c to stop it…



On Oct 20, 2014, at 4:10 PM, Usher, Tracy L. <> wrote:

PS Should have said this is larsoft v03_03_00.


On Oct 20, 2014, at 3:46 PM, Usher, Tracy L. <> wrote:

Hi Chris,
I’m having an issue with the use of artmod in building art and since I saw your name on the module I thought I’d send this to you to see if you might have any suggestions. First I should say I’ve wandered off the reservation a bit… I have been happily running larsoft on my macbook pro for the past 6-8 months, this with Mavericks. On the weekend a colleague put the bug in my ear to upgrade to Yosemite… so this is probably not high priority for you, no worries on my side.
So, I started working on building larsoft with the standard script and it has been a bit of a slog but not really so bad. There is an issue with building gcc 4.9.1 but one can find the workaround. After that I did hit three other issues, again mostly easily resolved. The larsoft build gets all the way to art when I hit the next issue, basically it looks like the build goes into an infinite loop or something when it makes the call to artmod to build the “ToolsTest${type}” modules. Basically, I see the message "Generating” (for example) but then it never seems to return. The build is being done in parallel so when I check the activity monitor I can see four perl processes are taking up cpu time but the created cc files are zero length so nothing is happening with them.
I’m hoping you might have some suggestions on how to attack this problem since I think I’m pretty close to getting the code to build and run and would prefer to complete this path rather than go back to Mavericks.
Thanks for any thoughts,


'phone (630) 840-2167; Skype:;
IM: , chissgreen (AIM, Yahoo),
(MSNM), (Google Talk).


#1 Updated by Christopher Green over 6 years ago

  • Status changed from New to Accepted
  • Priority changed from Normal to Low

This issue is accepted at low priority until Yosemite is cleared for use. I'm afraid it will require some analysis to understand the original intent of that line, and if there are alternative ways to achieve the desired affect in a way that is compatible with all supported versions of perl.

#2 Updated by Christopher Green over 6 years ago

  • SSI Package cetpkgsupport added
  • SSI Package deleted ()

#3 Updated by Kyle Knoepfel over 4 years ago

Does this issue still exist with cetskelgen? If not, can it be closed?

#4 Updated by Kyle Knoepfel over 4 years ago

  • Status changed from Accepted to Feedback

#5 Updated by Kyle Knoepfel over 4 years ago

  • Status changed from Feedback to Closed

We believe this issue has been resolved. If the problem recurs, please open a new issue.

Also available in: Atom PDF