Skip to content
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

Default cache-path not specific enough #55

Closed
UnitedMarsupials-zz opened this issue May 27, 2015 · 7 comments
Closed

Default cache-path not specific enough #55

UnitedMarsupials-zz opened this issue May 27, 2015 · 7 comments
Assignees
Labels
Milestone

Comments

@UnitedMarsupials-zz
Copy link

critcl tries to use a different subdirectory under ~/.critcl for each $OS-$ARCH combination -- in anticipation that the same home directory may be shared by the user on multiple computers.

Unfortunately, this is not enough -- and the operating system's release number should be part of it too. Because binaries built, for example, on FreeBSD-8 would be different from those built on FreeBSD-10, even if the architecture is the same. Same, likely, goes for SunOS, Linux-distros, et cætera.

@andreas-kupries andreas-kupries added this to the 3.1.16 milestone Jun 9, 2016
@andreas-kupries andreas-kupries self-assigned this Jun 9, 2016
@andreas-kupries
Copy link
Owner

Looking over the code the targetplatform information likely comes from the buildplatform information, which is initialized to the result of platform::generic.
This is the reduced platform information which has things like OS differences removed.
The full identification requires platform::identify.

Notes:

  1. The platform package is part of the Tcl core distribution. Definitely in 8.6+. Cannot recall when in the 8.5.x series, i.e. which patchlevel, it was added. Easiest to check is to run package require platform and see if that returns an error or not.
  2. As an aside, critcl comes with a critcl::platform package for when Tcl does not provide it (8.4.x for example).
  3. I do not recall what the output of platform::identify would be for FreeBSD.
    I suspect it does not take the FreeBSD differences into account there yet (because we had no FreeBSD machines around when it was written).
    It does account for Solaris kernel differences, and Linux glibc version differences..
  4. I would recommend to run platform::identify on your machines. Please provide patches to the Tcl core if the data coming back from the command is wrong.

andreas-kupries added a commit that referenced this issue Oct 10, 2016
Sync'd with Tcl core's platform package.
andreas-kupries added a commit that referenced this issue Oct 10, 2016
…me incorporating platform detail information.

Like: glibc version for linux, kernel version for solaris, etc.
Plus extended comment on why that works.
@andreas-kupries
Copy link
Owner

Mostly addressed in commit 22cb4f3.
I still need information about the output of platform::identify on "FreeBSD" to say if that needs an update or not.

@andreas-kupries
Copy link
Owner

Closing. Aforementioned commit has the switch generic to identify.
The info about FreeBSD has to go through the core's platform package.
The relevant tracker is at https://core.tcl.tk/tcl/tktnew

@UnitedMarsupials-zz
Copy link
Author

% package require critcl
3.1.15
% package require critcl::platform
1.0.11
% platform::identify
freebsd-amd64

Back in 2006 I created an account (aku) for you on one of my machines. The account is still active -- you are most welcome to use it for testing any of your software on FreeBSD.

@andreas-kupries
Copy link
Owner

Huh. Can you give me the name/IP of that machine ?
Do I need a password as well ?

andreas-kupries added a commit that referenced this issue Oct 12, 2016
…ion. Prefer the internal package over the official while the official package does not have the equivalent code.
@andreas-kupries
Copy link
Owner

Ok. This issue should now be fully addressed, with commits 136cab3 and 4152c8e.

The internal package critcl::platform now incorporates the FreeBSD ABI version, and this package is preferred while the official package in the core does not do the same.

Note, while I tested on your machine, I had to make some local changes to ensure that my test code used the new critcl::platform package (@/home/aku/opt) instead of the older one from the global critcl installation (@/opt). As such I would like to ask you to do your own check as well, with a properly installed critcl, and your own examples.

@andreas-kupries
Copy link
Owner

Nothing bad heard for two weeks, considering this as done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants