Issue #3 new

csc -deploy... fails, reports missing libchicken.dll

Vlad Sarella
created an issue

Can't make portable builds with csc -deploy. It's looking for libchicken.dll in "<Scheme Chicken>\lib" directory, but it's actually under bin. Copying the .dll into lib solves the problem, but probably isn't the right thing to do.

...
csc -deploy ./src/test.scm -o ./build/test -I ./src
The system cannot find the file specified.

Error: shell command terminated with non-zero exit status 1: 
"copy /Y "C:\Program Files (x86)\Chicken Scheme\lib\libchicken.dll" "build\test""

As a side note, I also use chicken-install command to install extensions for portable builds and that seems to work fine:

chicken-install -deploy -p ./build/test defstruct

Comments (4)

  1. Răzvan Rotaru repo owner

    This is chickens fault. For some reason, the build scripts put libchicken.dll in "bin", but "csc -deploy" expects it to be in "lib" (and I would bet that this happens only on windows). I'm not sure how the fix should look like, though. Either csc is changed to look in the bin folder, or the build scripts are changed to put libchicken.dll in lib. I sent the bug to the chicken team. Let's see how they answer.

  2. Vlad Sarella reporter

    I looked at csc source code yesterday and i think i found the general area where the bug might be. The guilty function is definitely (target-lib-path), it's the one returning lib path. Also i noticed some paths are set during compilation time, coming from foreign variables defined inside defaults.make. For instance INSTALL_BIN_HOME is pointing to c:\chicken\bin, because your build.bat is building it there, so this stuff get statically compiled into executable. I don't know if it's the problem yet, but it looks suspicious. Also in file rules.make:305 it looks like there a branch during installation of libraries, LIBCHICKEN_SO_FILE in particular which is the libchicken, where it can either put it under $(DESTDIR)$(IBINDIR) or $(DESTDIR)$(ILIBDIR). So if it puts it under IBINDIR, it must be that DLLSINPATH is set. I'll try to compile it without this flag, later. If we fix it we can just patch up some sources and it should be good to go.

  3. Vlad Sarella reporter

    Changed target-lib-path, it got past not finding the libchicken file, now i'm getting another problem from chicken-install, because a path to csc got double quoted so it looks like ""C:\Program Files (x86)\Chicken Scheme\bin\csc""... sigh

    Command ""C:\Program not found...

    Here's what i did to target-lib-path, in theory it shouldn't break anything else because it's used only in once place.

    (define (target-lib-path)
      (let ((tdir TARGET_LIB_HOME))
        (if (and (not (string=? tdir ""))
                   cross-chicken
                   (not host-mode))
            tdir
            (prefix "" "bin" ""))))
    
  4. Log in to comment