Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

Sqlite-3.35.5 emerge error caused by TCL script

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
gebau00a
n00b
n00b
Posts: 2
Joined: Tue Oct 05, 2021 4:43 am

Sqlite-3.35.5 emerge error caused by TCL script

  • Quote

Post by gebau00a » Tue Oct 05, 2021 4:58 am

I'm right now recompiling my whole system with clang, lld and libcxx

I stumbled across a strange error when compiling sqlite, even trying to compile with gcc does not work.
The problem is created during the amalgation of sqlite3.c by the mksqlite3c.tcl script in the tool folder.
The sqlite3.c file created comments or breaks some code sections, leaves other comments as code.

Example of starting comment (see position of the /**)

Code: Select all

#if SQLITE_COVERAGE_T/**
  "COVERAGE_TEST",
#endif
#if SQLITE_DEBUG
  "DEBUG",
#endif
Example of uncommenting comments to code (see position of the /**)

Code: Select all

** <li>[[SQLITE_FCNTL_BUSYHANDLER]]
** ^The [SQLITE_FCNTL_BUSYHANDLER]
** file-control may be invoked by SQLite on the database file handle
** shortly after it is opened in order to provide a custom VFS with access
** to the connection's busy-handler callback. The argument is of type (void**)
** - an array of two (void *) values. The first (void *) actually points
** to a function of type (int (*)(void *)). In order to invoke the connection's
** busy-handler, this function should be invoked with the second (void *) in
**/**
  "CO
#es the only argument. If it returns non-zero, then the operation
** should be retried. If it returns zero, the custom VFS should abandon the
** current operation.
**
This behaviour is also present when manually triggering mksqlite3c.tcl (tclsh tool/mksqlite3c.tcl)
When triggering steps after step in ebuild, I can uncomment the triggering in the Makefile and copy the already amalgated file from the sqlite project (https://www.sqlite.org/2021/sqlite-amal ... 350500.zip).
It will compile then.

So what could cause such a weird behaviour of tcl?
Is someone else experience a similar issue whe compiling sqlite
Top
demiank10
n00b
n00b
Posts: 10
Joined: Fri Oct 15, 2021 3:56 pm

  • Quote

Post by demiank10 » Sun Oct 17, 2021 11:49 pm

I have the same problem with stage3 musl
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Oct 18, 2021 12:38 am

With what options was tcl compiled? If you rebuild tcl using gcc and conservative CFLAGS, does the problem go away? When tcl mangles the file, is the file mangled the same way every time? Could you provide a hunk from a diff -u of the mangled file versus the unmangled one?
Top
demiank10
n00b
n00b
Posts: 10
Joined: Fri Oct 15, 2021 3:56 pm

  • Quote

Post by demiank10 » Mon Oct 18, 2021 2:29 pm

Hu wrote:With what options was tcl compiled? If you rebuild tcl using gcc and conservative CFLAGS, does the problem go away? When tcl mangles the file, is the file mangled the same way every time? Could you provide a hunk from a diff -u of the mangled file versus the unmangled one?
I compile without tcl, I want compile entire system with clang/llvm.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Oct 18, 2021 3:19 pm

If you compiled without tcl, how do you have a tclsh to rebuild this file incorrectly?
Top
gebau00a
n00b
n00b
Posts: 2
Joined: Tue Oct 05, 2021 4:43 am

  • Quote

Post by gebau00a » Thu Oct 28, 2021 1:54 am

Compiling tcl with GCC solves the issue.
So it seems to be a bug in tcl, that it on one hand compiles properly in clang, but fails to execute the script afterwards.

While TCL itself has a page with title Clang, which is empty, the platform support page lists only GCC as compiler:
https://www.tcl-lang.org/software/tcltk/platforms.html
Top
maxbfuer
n00b
n00b
Posts: 1
Joined: Wed Oct 20, 2021 9:43 am

  • Quote

Post by maxbfuer » Sun Nov 14, 2021 8:16 pm

gebau00a wrote:Compiling tcl with GCC solves the issue.
So it seems to be a bug in tcl, that it on one hand compiles properly in clang, but fails to execute the script afterwards.

While TCL itself has a page with title Clang, which is empty, the platform support page lists only GCC as compiler:
https://www.tcl-lang.org/software/tcltk/platforms.html
That solved it for me, thank you.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Nov 14, 2021 11:07 pm

What is the solution here? If tcl doesn't work in clang, that should be fixed.
Top
sam_
Developer
Developer
User avatar
Posts: 2814
Joined: Fri Aug 14, 2020 12:33 am

  • Quote

Post by sam_ » Mon Nov 22, 2021 6:36 am

Hu wrote:What is the solution here? If tcl doesn't work in clang, that should be fixed.
Yes, please do file a bug for this, we really want to know how it broke with Clang if possible...
Top
justinkb
Apprentice
Apprentice
Posts: 161
Joined: Tue Dec 23, 2008 10:41 pm

  • Quote

Post by justinkb » Wed Nov 24, 2021 3:23 pm

I just hit this issue too. I have FEATURES="test" enabled, so was able to confirm practically the entire test suite for tcl fails when compiled with clang/libc++ combo. When building with gcc, the test suite completes successfully, and the weird issue with sqlite build system also doesn't appear.

I've found no reports upstream on the tcl bug tracker regarding this clang miscompilation issue
Top
dilfridge
Developer
Developer
User avatar
Posts: 121
Joined: Sat Sep 18, 2010 11:38 am
Location: Regensburg, Germany
Contact:
Contact dilfridge
Website

  • Quote

Post by dilfridge » Thu Dec 02, 2021 9:46 pm

Filed bugs:

https://bugs.gentoo.org/828035
https://core.tcl-lang.org/tcl/info/206e58994f3806ec
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy