New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SF#392 Inline Pdlpp doesn't work in clean build tree #126
Comments
Sorry, I opened #231 since I missed the existence of this! I'll close that in favour of this and put my comment here. |
@devel-chm There was no attached script; could you provide one? :-) |
This is impossible to repro without a script and a method of seeing the error. Possibly you'd work around it by using the |
Attached is a script that triggers this error. I had assumed the 'FtoC' in @devel-chm's original report was 'Fortran-to-C', and it was hopeless to ever reproduce it. But probably 'FtoC' was the 'Fahrenheit-to-Celsius' dataflow example code from Section 5.1 of Practical Magick with C, PDL and PDL::PP. Here is the output of running the script in the home directory, and in the 'realclean' PDL build directory. Note that the script in the home directory is a symlink to the script in the PDL build directory, so there's no difference in the code. derek@simurgh:~$ rm -rf _Inline/
derek@simurgh:~$ ls -l pp_dataflow.pdl
lrwxr-xr-x 1 derek staff 38 Jun 22 11:52 pp_dataflow.pdl -> /Users/derek/Build/PDL/pp_dataflow.pdl
derek@simurgh:~$ perl pp_dataflow.pdl
Name "main::FtoC" used only once: possible typo at pp_dataflow.pdl line 26.
0
33.8 F = 0.999999999999998 C
34.8 F = 1.55555555555555 C
derek@simurgh:~$ cd /Users/derek/Build/PDL/
derek@simurgh:PDL$ rm -rf _Inline/
derek@simurgh:PDL$ perl pp_dataflow.pdl
Unable to find PDL's configuration info
[Can't locate /Users/derek/Build/PDL/Basic/Core/Config.pm at (eval 17) line 1.
] at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/PDL/Core/Dev.pm line 145.
Compilation failed in require at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/Inline/Pdlpp.pm line 10.
BEGIN failed--compilation aborted at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/Inline/Pdlpp.pm line 10.
Compilation failed in require at (eval 9) line 1.
Unable to find PDL's configuration info
[Can't locate /Users/derek/Build/PDL/Basic/Core/Config.pm at (eval 17) line 1.
] at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/PDL/Core/Dev.pm line 145.
Compilation failed in require at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/Inline/Pdlpp.pm line 10.
BEGIN failed--compilation aborted at /Users/derek/local/lib/perl5/darwin-thread-multi-2level/Inline/Pdlpp.pm line 10.
Compilation failed in require at (eval 9) line 1.
Error. You have specified 'Pdlpp' as an Inline programming language.
I currently only know about the following languages:
C, Foo, foo
If you have installed a support module for this language, try deleting the
config-darwin-thread-multi-2level-5.028002 file from the following Inline DIRECTORY, and run again:
/Users/derek/Build/PDL/_Inline
(And if that works, please file a bug report.)
at pp_dataflow.pdl line 5.
BEGIN failed--compilation aborted at pp_dataflow.pdl line 5.
derek@simurgh:PDL$ |
@d-lamb Thanks for digging this out! In fact, this can be reduced to this script: use Inline Pdlpp => q{pp_def('add', Pars => 'a(); [o]c();', Code => '$c() = $a() + 1;');}; The error message above shows what's happening; PDL::Core::Dev has special handling for when it's run within the source tree, as it has to in order to work during the build of PDL. However, it assumes the initial configuration has been done by running I think it would create a lot of work and also risk, for a very minimal benefit, to change PDL::Core::Dev to handle this. Therefore, I will close this. But I'm very glad that we've actually been able to reproduce this in order to understand it! |
Further analysis of this, prompted by needing PDL::Core::Dev to work very early in the build process in order to extract from The However, bd3f457 changes the strategy to one that is obvious in retrospect: capture where the |
From http://sourceforge.net/p/pdl/bugs/392/
The text was updated successfully, but these errors were encountered: