Skip to content

Commit

Permalink
Call GAP with -r option ...
Browse files Browse the repository at this point in the history
... when asking for printed output,
since `~/.gap/gaprc` may contain `Print` statements.
  • Loading branch information
ThomasBreuer authored and fingolfin committed Dec 10, 2020
1 parent 1151153 commit 7237970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/BuildPackages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ run_configure_and_make() {
then
if grep Autoconf ./configure > /dev/null
then
local PKG_NAME=$($GAP -q -T -A <<GAPInput
local PKG_NAME=$($GAP -q -T -A -r <<GAPInput
Read("PackageInfo.g");
Print(GAPInfo.PackageInfoCurrent.PackageName);
GAPInput
Expand Down

3 comments on commit 7237970

@mtorpey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ThomasBreuer and @fingolfin.

I've just discovered this while debugging the package manager. The -r flag means that a GAPDoc installation in ~/.gap/pkg/ is not sufficient, and that we need to have GAPDoc installed in the GAP root in order to compile any other packages. Obviously it'd be good if the user pkg directory could be used.

Is there a way we could remove the -r here without breaking things?

@fingolfin
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about instead setting GAP before starting BuildPackages.sh so that it gives a suitable -l "PATH/TO/YOUR/GAPROOT;" so that it definitely sees "your" GAPDoc first?

@mtorpey
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I've had a go, but I'm struggling a bit. If I call

~/gap/bin/BuildPackages.sh --with-gaproot=/home/mtorpey/gap --with-gap='gap -l "/home/mtorpey/.gap;/home/mtorpey/gap"'

inside the directory of the io package, I get

/home/mtorpey/gap/bin/BuildPackages.sh: line 203: PACKAGE_CONFIG_ARGS_gap: hmm, I cannot find 'lib/init.g' maybe use option '-l <gaproot>'?

Maybe I'm using -l or --with-gap wrongly? If I specify GAP=... at the beginning of the command, it seems to be ignored.

Please sign in to comment.