Opened 4 years ago

Last modified 3 years ago

#1714 new defect

types.db not found on mingw32

Reported by: Răzvan Rotaru Owned by:
Priority: major Milestone: someday
Component: unknown Version: 5.2.0
Keywords: Cc:
Estimated difficulty:

Description

Hi,

On my build (Windows, with an old mingw32) types.db is not found anymore.

D:\tmp\chicken\'types.db' not found>type str.scm
(display "Sunday")
(newline)
D:\tmp\chicken\'types.db' not found>chicken str.scm -output-file "str.c"

Error: default type-database `types.db' not found

Chicken is installed in "C:\Program Files (x86)\Chicken Scheme", and types.db is in "c:\Program Files (x86)\Chicken Scheme\lib\chicken\11\"
. Where does csc look for types.db?

Change History (1)

comment:1 Changed 3 years ago by Răzvan Rotaru

I found the problem. chicken.exe looks for types.db in c:/chicken/lib/chicken/11, because c:/chicken is the prefix with which chicken was compiled.

Setting the environment variable CHICKEN_REPOSITORY_PATH to the correct path solves the problem. Unfortunately the same happens when using csc:

D:\tmp\chicken>csc test.scm
The system cannot find the path specified.

Error: shell command terminated with non-zero exit status 1: ""c:/chicken/bin/chicken.exe" "test.scm" -output-file "test.c""

The bigger problem seems to be following: the installer I built for windows installs a precompiled version of chicken, and relies on the environment variable CHICKEN_PREFIX to override the prefix which was used during build. This does not seem to work.

So the question is whether and how this can be done. The various paths seem to be defined in C variables.

(define host-repo (foreign-value "C_INSTALL_EGG_HOME" c-string))
(define host-libdir (foreign-value "C_INSTALL_LIB_HOME" c-string))
(define host-bindir (foreign-value "C_INSTALL_BIN_HOME" c-string))
(define host-incdir (foreign-value "C_INSTALL_INCLUDE_HOME" c-string))
(define host-sharedir (foreign-value "C_INSTALL_SHARE_HOME" c-string))
(define host-libs (foreign-value "C_INSTALL_MORE_LIBS" c-string))
(define host-cflags (foreign-value "C_INSTALL_CFLAGS" c-string))
(define host-ldflags (foreign-value "C_INSTALL_LDFLAGS" c-string))
(define host-cc (foreign-value "C_INSTALL_CC" c-string))
(define host-cxx (foreign-value "C_INSTALL_CXX" c-string))

Can they be overridden/changed after chicken was build?

Sources for the installer are here: https://bitbucket.org/roti/chicken-installer

Note: See TracTickets for help on using tickets.