WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Building guile 2.2.x fails  (Read 3609 times)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Building guile 2.2.x fails
« on: July 27, 2023, 07:58:19 AM »
Hi Core people,

I'm trying to build guile 2.2 for my needs (want to try gEDA-gaf 0.10.2). Tried 2.2.7, 2.2.2, 3.0.9. Read Juanito's compile_guile reciept, LFS, void-packages - nothing helps.
Error looks like:
Code: [Select]
  GEN      guile-procedures.texi
Uncaught exception:
Throw to key encoding-error with args ("scm_to_stringn" "cannot convert narrow string to output locale" 38 #f #f)
If someone succeed building guile 2.2 or higher please share Your success story.

Thanks in advance.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #1 on: July 27, 2023, 08:39:00 AM »
Sorry, forgot to mention that I'm trying on TCx86 13.1.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11282
Re: Building guile 2.2.x fails
« Reply #2 on: July 27, 2023, 09:02:19 AM »
Hi jazzbiker
Just a longshot, but do have  glibc_gconv.tcz  installed?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14613
Re: Building guile 2.2.x fails
« Reply #3 on: July 27, 2023, 09:04:46 AM »
Do you have texinfo, glibc_gconv and glibc_i18n_locale loaded?

Are there any configure switches that disable building documentation?

Do you have a locale set?

If none of the above work you could hack the Makefile so it omits the documentation.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #4 on: July 27, 2023, 09:10:09 AM »
Didn't thought about texinfo, in Your compile_guile it was not mentioned.
glibc_gconv loaded.
glibc_i18n_locale - need to look, haven't checked. But locale is off.
Was reading ./configure --help but noticed nothing about disabling the docs.

Thank's a lot! :-)

Time to compile.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #5 on: July 27, 2023, 09:13:36 AM »
glibc_i18n_locale had no effect.

Hack the Makefile - mission impossible :-( It is generated and is 68k in size ...

Edit: loading texinfo had no effect simply making. But maybe I must clean and configure again.
« Last Edit: July 27, 2023, 09:16:23 AM by jazzbiker »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14613
Re: Building guile 2.2.x fails
« Reply #6 on: July 27, 2023, 09:23:54 AM »
It would be better to “make distclean” and run configure again.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11282
Re: Building guile 2.2.x fails
« Reply #7 on: July 27, 2023, 09:35:20 AM »
Hi jazzbiker
... If none of the above work you could hack the Makefile so it omits the documentation.
... Hack the Makefile - mission impossible :-( It is generated and is 68k in size ...
You might be able to accomplish this by just deleting the
make files under the doc directory tree.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #8 on: July 27, 2023, 09:44:37 AM »
You might be able to accomplish this by just deleting the
make files under the doc directory tree.

Hi Rich,

It seems to be the great idea! What's Your opinion when it must be done with respect to configure? Before or after?
Maybe I will try to remove the whole doc directory?

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #9 on: July 27, 2023, 09:47:06 AM »
It would be better to “make distclean” and run configure again.

Sorry, no luck. Your patch on Makefiles turning off the "-g -O2" applied. :-(

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #10 on: July 27, 2023, 10:12:10 AM »
You might be able to accomplish this by just deleting the
make files under the doc directory tree.

Hi Rich,

Sorry but no luck too. Error thrown after the number of
Code: [Select]
...
  SNARF  values.doc
  SNARF  variable.doc
  SNARF  vectors.doc
  SNARF  version.doc
  SNARF  vports.doc
  SNARF  weak-set.doc
  SNARF  weak-table.doc
  SNARF  weak-vector.doc
  SNARF  posix.doc
  SNARF  net_db.doc
  SNARF  socket.doc
  SNARF  regex-posix.doc
  GEN      guile-procedures.texi
Uncaught exception:
Throw to key encoding-error with args ("scm_to_stringn" "cannot convert narrow string to output locale" 38 #f #f)
inside libguile directory.

There are warnings during compile about
Code: [Select]
if (sizeof (c) == 8)
    ret = (((unsigned long)c) << 32) | b;
else
    ret = b;
shifting of 32-bit variable. But sizeof (c) is not 8. Strange and suspicious is that those warnings are issued exactly from narrow_string_hash() function in libguile/hash.c. But this shift must not be performed - normally.

Anyway time to take the pause. Thank You and Juanito for the help.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Re: Building guile 2.2.x fails
« Reply #11 on: July 27, 2023, 11:51:56 AM »
Hi jazzbiker. FWIW I tried to compile guile 2.2.7 on TCL 14.x x86_64 and am able to reproduce your problem.

My locale is en_US.UTF-8. Changing locale to C did not help. Installing the additional extensions that Juanito recommneded also did not help. I tried to find the configure option that disables documentation but was unsuccessful.

The build instructions that I found (here and here) are missing the instructions of what to edit in the configure script. Note the incomplete "for...do..done" statement:
Code: [Select]
edit configure
for termlib in ncursesw curses termcap terminfo termlib pdcurses ; do

CC="gcc -flto -mtune=generic -Os -pipe" CXX="g++ -flto -mtune=generic -Os -pipe -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local --disable-static --localstatedir=/var
The mystery edit could be totally unrelated to the compilation error or could be the secret to success.

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #12 on: July 27, 2023, 01:20:48 PM »
I'm now at TC10 x86 and I want to say that guile 2.2.7 compiled successfully. Now it is very slowly building some prebuild object files. Seems that it will take all night long at my slow box.

Offline GNUser

  • Hero Member
  • *****
  • Posts: 1378
Re: Building guile 2.2.x fails
« Reply #13 on: July 27, 2023, 01:34:40 PM »
I'm glad you figured it out!

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Building guile 2.2.x fails
« Reply #14 on: July 27, 2023, 09:29:47 PM »
Error thrown during module/scripts/snarf-check-and-output-texi.scm

While building 2.2.7 it is uncaught exception and build hangs.Building 3.0.9 manages to catch an exception and exits with error messages.

snarf-check-and-output-texi.scm seems to use C functions through ffi. libffi version changed from 3.2.1 (TC11) to 3.3 (TC12 and later).
« Last Edit: July 27, 2023, 09:53:53 PM by jazzbiker »