shorten install path (skip e.g. target/x86_64-pc-linux-gnu)?

5 views
Skip to first unread message

Qian Yun

unread,
Nov 7, 2023, 7:09:19 AM11/7/23
to fricas-devel
I believe this was not discussed before?

Currently we install FriCAS into a very long path, something like:
/usr/lib64/fricas/target/x86_64-pc-linux-gnu/
I suggest to shorten in to
/usr/lib64/fricas/ aka $PREFIX/fricas

(And in build directory, everything is installed under "./target/"
instead of "./target/x86_64-pc-linux-gnu/".)

Since we don't support cross-compiling, current scheme makes no sense.
(And it's causing a little inconvenience for CI work, since I have to
hardcode such paths.)

If we agree to make this change, I can start to tweak the build system.

- Qian

Waldek Hebisch

unread,
Nov 7, 2023, 8:14:46 AM11/7/23
to fricas...@googlegroups.com
On my machine this is slightly shorter: x86_64-linux-gnu. Such
convention is needed to install bianaries for different architectures
in the same filesystem. You may think that installing binaries
for multiple architecures is exotic, but in fact in last 10 years
Linux distribitions spent a lot of effort so that this works
smoothly for basic system software. It would be a shame if
FriCAS regressed on this.

Concerning hardcoded paths: the lnog names are there because it
is easier to avoid accidental clashes when paths are mechanically
generated. So you should use paths (or variables) generated by
configure machinery.

--
Waldek Hebisch

Qian Yun

unread,
Nov 7, 2023, 8:25:05 AM11/7/23
to fricas...@googlegroups.com


On 11/7/23 21:14, Waldek Hebisch wrote:
>
> On my machine this is slightly shorter: x86_64-linux-gnu. Such

This is because you tweaked config/config.guess, right?
This is another reason I wanted to abandon this scheme.
I want to sync config/config.guess with upstream, it will be needed
for the ARM Macs.
(And this tweak caused problems for SAGE, IIRC.)

> convention is needed to install bianaries for different architectures
> in the same filesystem. You may think that installing binaries
> for multiple architecures is exotic, but in fact in last 10 years
> Linux distribitions spent a lot of effort so that this works
> smoothly for basic system software. It would be a shame if
> FriCAS regressed on this.

This can be achieved by using different --prefix?
Also, how did you build and run different archs on one machine?

- Qian

Waldek Hebisch

unread,
Nov 7, 2023, 4:20:53 PM11/7/23
to fricas...@googlegroups.com
On Tue, Nov 07, 2023 at 09:25:00PM +0800, Qian Yun wrote:
>
>
> On 11/7/23 21:14, Waldek Hebisch wrote:
> >
> > On my machine this is slightly shorter: x86_64-linux-gnu. Such
>
> This is because you tweaked config/config.guess, right?

Yes.

> This is another reason I wanted to abandon this scheme.
> I want to sync config/config.guess with upstream, it will be needed
> for the ARM Macs.

Yes, we need to update config/config.guess for Apple machines.

> (And this tweak caused problems for SAGE, IIRC.)

AFAIUI it was purely imaginary problem, they complained that
FriCAS uses its own config.guess but did not mention any
actual problem.

> > convention is needed to install bianaries for different architectures
> > in the same filesystem. You may think that installing binaries
> > for multiple architecures is exotic, but in fact in last 10 years
> > Linux distribitions spent a lot of effort so that this works
> > smoothly for basic system software. It would be a shame if
> > FriCAS regressed on this.
>
> This can be achieved by using different --prefix?

Well, this would be doing things manually instead of automatic
support.

> Also, how did you build and run different archs on one machine?

Well, one case is 32-bit and 64-bit support on the same machine.
Related is biendian machine or multiple ABI-s (single hardware
architecture, but multiple architectures from software point
of view).

Classic case is running binaries on multiple machines having
different architectures but sharing network filesystem.

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages