WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Building guile 2.2.x fails
« on: July 27, 2023, 10: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, 11:39:00 AM »
Sorry, forgot to mention that I'm trying on TCx86 13.1.

Offline Rich

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

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14841
Re: Building guile 2.2.x fails
« Reply #3 on: July 27, 2023, 12:04:46 PM »
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, 12:10:09 PM »
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, 12:13:36 PM »
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, 12:16:23 PM by jazzbiker »

Offline Juanito

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

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11691
Re: Building guile 2.2.x fails
« Reply #7 on: July 27, 2023, 12:35:20 PM »
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, 12:44:37 PM »
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, 12:47:06 PM »
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, 01:12:10 PM »
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

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Building guile 2.2.x fails
« Reply #11 on: July 27, 2023, 02:51:56 PM »
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, 04: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

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Building guile 2.2.x fails
« Reply #13 on: July 27, 2023, 04: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 28, 2023, 12:29:47 AM »
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 28, 2023, 12:53:53 AM by jazzbiker »