[squeak-dev] C standard library not available. Please check module name in preferences.

Marcel Taeumel marcel.taeumel at hpi.de
Mon Sep 6 07:34:12 UTC 2021


Hi Tobias --

>Should we hence put a category of well-known system library names
> into primitives with default names as fallback?

Hmm... can this info already be retrieved from other VM parameters already accessible? See CStandardLibrary class >> #guessModuleName for the current "magic". It uses the following VM attributes:

1001 #platformName
1002 #osVersion
1003 #platformSubtype

Best,
Marcel

Am 05.09.2021 21:09:38 schrieb Tobias Pape <das.linux at gmx.de>:
Hi


> On 5. Sep 2021, at 18:37, gettimothy wrote:
>
> root at tinker:~# file /usr/lib64/libc.so
> /usr/lib64/libc.so: ASCII text
> root at tinker:~# ldd /usr/lib64/libc.so
> not a dynamic executable
> root at tinker:~#
>
>
> hmmm!

Yep!

According to
https://stackoverflow.com/questions/34879686/loading-gnu-ld-script-with-dlopen
and
https://sourceware.org/legacy-ml/libc-alpha/2011-07/msg00152.html

It would probably a good Idea to expose the contents of gnu/lib-names.h
in case we are on a GNU-Libc system (like RHEL/Debian based as opposed to
eg, musl-based systems such as Arch, or any other Unix for that matter).

Should we hence put a category of well-known system library names
into primitives with default names as fallback?

such as

UnixFFI class>>libcName
"or something"
^ 'libc.so' "unixy default"

(I'm making thinks up as I go…)

-t

>
>
> I then checked in /lib64/ and found
>
> /lib64/libc.so.6
>
> I put that in the preferences and all is good.
>
> Thank you for your help!
>
>
>
>
>
>
> ---- On Sun, 05 Sep 2021 11:53:57 -0400 Tobias Pape wrote ----
>
> Hi
>
>
> > On 5. Sep 2021, at 17:37, gettimothy via Squeak-dev wrote:
> >
> > Howdy,
> >
> >
> > Thanks for the advice.
> >
> > I did as you suggested.
> >
> > Runing squeak.sh I just noticed the following in the xterm from which I launced it:
> >
> >
> > /usr/lib64/libc.so tryLoading //usr/lib64/libc.so: dlopen: //usr/lib64/libc.so: invalid ELF header
> >
> > I have no idea
> >
> >
> > I removed the leading '/' due to the dlopen: // message, but same result different output.
> >
> > usr/lib64/libc.so tryLoading /usr/lib64/libc.so: dlopen: /usr/lib64/libc.so: invalid ELF header
>
>
> what does
> file /usr/lib64/libc.so
> and
> ldd /usr/lib64/libc.so
> say?
>
> Best regards
> -Tobias
> > cheers.
> >
> >
> >
> > ---- On Sun, 05 Sep 2021 10:27:57 -0400 Marcel Taeumel wrote ----
> >
> > Hmm... you might want to try a fully qualified path? At least that's required in Ubuntu ... if you have an idea on how to improve CStandardLibrary class >> #guessModuleName, feel free to share it here. :-)
> >
> > Do other libraries load through FFI?
> >
> > Best,
> > Marcel
> >
> > Am 01.09.2021 20:11:13 schrieb gettimothy via Squeak-dev :
> >
> > I forgot to mention that I changed the entry in Preferences -> FFI Libraries -> C runtime/standard library (aka.CRT and libc) from the original libc.so.6 to my systems' libc.soC standard library not available. Please check module name in preferences.
> >
> >
> > ls /usr/lib64/libc.*
> >
> > /usr/lib64/libc.a /usr/lib64/libc.s
> >
> >
> >
> > cheers.
> >
> >
> > ---- On Wed, 01 Sep 2021 14:03:39 -0400 gettimothy via Squeak-dev wrote ----
> >
> > Hi folks
> >
> >
> > I downloaded the latest Squeak from trunk (looking good btw, and very fast)
> >
> > After installation and adding the options in the wizard, I am getting:
> >
> > C standard library not available. Please check module name in preferences.
> >
> > Error: External module not found
> >
> >
> >
> > I am running Slackware Linux 64. Slackware has an oddity about it in that the core libraries are in /lib64 instead of /lib in case you suspect its a path issue.
> >
> >
> >
> > About Squeak stuff follows:
> >
> > Image
> > -----
> > /home/wm/usr/src/smalltalk/SqueakBooks/shared/Squeak6.0alpha-20582-64bit.image
> > Squeak6.0alpha
> > latest update: #20611
> > Current Change Set: HomeProject
> > Image format 68021 (64 bit)
> > Preferred bytecode set: SistaV1
> >
> > Virtual Machine
> > ---------------
> > /home/wm/usr/src/smalltalk/SqueakBooks/bin/squeak
> > Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-nice.2715]
> > Unix built on Mar 3 2020 08:27:09 Compiler: 4.2.1 Compatible Clang 7.0.0 (tags/RELEASE_700/final)
> > platform sources revision VM: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Mon Mar 2 18:30:55 2020 CommitHash: 6a0bc96 Plugins: 202003021730 https://github.com/OpenSmalltalk/opensmalltalk-vm.git
> > CoInterpreter VMMaker.oscog-nice.2715 uuid: 78e2f556-9829-42fe-963d-e19dfc43c0e9 Mar 3 2020
> > StackToRegisterMappingCogit VMMaker.oscog-eem.2719 uuid: e40f3e94-3a54-411b-9613-5d19114ea131 Mar 3 2020
> >
> > To Build A Similar Virtual Machine
> > ----------------------------------
> > Visit https://github.com/OpenSmalltalk/opensmalltalk-vm; follow the
> > "Clone or download" instructions, then read the top-level README.md
> > and HowToBuild files in the top-level build directory for your
> > platform(s), build.macos64x64/HowToBuild, build.win32x86/HowToBuild, etc.
> >
> > Virtual Machine Commandline Options
> > -----------------------------------
> > #1 -encoding
> > #2 UTF-8
> > #3 -vm-sound-pulse
> > #4 /home/wm/usr/src/smalltalk/SqueakBooks/shared/Squeak6.0alpha-20582-64bit.image
> >
> > Loaded VM Modules
> > -----------------
> > B2DPlugin VMMaker.oscog-eem.2719 (i)
> > BitBltPlugin VMMaker.oscog-eem.2719 (i)
> > CroquetPlugin VMMaker.oscog-eem.2673 (i)
> > FilePlugin VMMaker.oscog-eem.2673 (i)
> > FloatArrayPlugin VMMaker.oscog-eem.2673 (i)
> > LargeIntegers v2.0 VMMaker.oscog-eem.2719 (i)
> > Matrix2x3Plugin VMMaker.oscog-eem.2673 (i)
> > MiscPrimitivePlugin VMMaker.oscog-eem.2692 (i)
> > SecurityPlugin VMMaker.oscog-eem.2673 (i)
> > SocketPlugin VMMaker.oscog-eem.2673 (i)
> > SqueakFFIPrims
> > SurfacePlugin Mar 3 2020 (i)
> > UnixOSProcessPlugin VMConstruction-Plugins-OSProcessPlugin.oscog-dtl.66 (e)
> >
> > Operating System/Hardware
> > -------------------------
> > unix linux-gnu x86_64
> >
> >
> > thx in advance.
> >
> >
> >
> >
> >
> >
> >
>
>
>
>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20210906/5cefe109/attachment.html>


More information about the Squeak-dev mailing list