1

I tried to compile a scheme file with CHICKEN and it says there that I need to install the iup port of CHICKEN. So I went to the website and tried to install the iup port but I got an error. Then I realized I need to get ffcall. I got that installed and tried to install the iup port again. And failed. I don't know if I got srfi-42 installed on my system. Even if I know it's not installed I still don't know how to install srfi-42 to get the iup port to work.

This is the error that I get:

    ander@Ander:~/blah/chicken-4.11.0/chicken-4.11.0$ sudo chicken-install iup             
retrieving ...
connecting to host "chicken.kitten-technologies.co.uk", port 80 ...
requesting "/henrietta.cgi?name=iup&mode=default" ...
reading response ...
HTTP/1.1 200 OK
Date: Sat, 12 Nov 2016 06:16:26 GMT
Server: Apache/2.2.31 (Unix) DAV/2 PHP/5.5.36 mod_fastcgi/2.4.6
Connection: close
Transfer-Encoding: chunked
Content-Type: text/plain
reading chunks ....
reading files ...
  ./iup-controls.scm
  ./iup-base.scm
  ./iup-config.scm
  ./iup-glcanvas.scm
  ./iup-dialogs.scm
  ./iup-dynamic.scm
  ./iup-glcontrols.scm
  ./iup-mglplot.scm
  ./iup-ole.scm
  ./iup-plot.scm
  ./iup-pplot.scm
  ./iup-scintilla.scm
  ./iup-types.scm
  ./iup-web.scm
  ./iup.meta
  ./iup.release-info
  ./iup.scm
  ./iup.setup
 iup located at /tmp/temp5d54.6346/iup
checking platform for `iup' ...
checking dependencies for `iup' ...
install order:
("iup")
installing iup:1.8.0 ...
changing current directory to /tmp/temp5d54.6346/iup
  '/usr/local/bin/csi' -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"iup\" \"1.8.0\"))" 'iup.setup'
  '/usr/local/bin/csc' -feature compiling-extension -setup-mode    -s -O2 -d1 iup.scm -j iup -j iup-base -j iup-controls -j iup-dialogs -j iup-glcanvas -j iup-glcontrols -j iup-plot -j iup-mglplot -j iup-pplot -j iup-scintilla -j iup-web -j iup-config -lcallback -liup -liupim -liupimglib -liupcontrols -liupmatrixex -liupgl -liupglcontrols -liup_plot -liup_mglplot -liup_pplot -liup_scintilla -liupweb
iup.c:17:16: fatal error: im.h: No such file or directory
compilation terminated.

Error: shell command terminated with non-zero exit status 256: 'gcc' 'iup.c' -o 'iup.o' -c  -fno-strict-aliasing -fwrapv -DHAVE_CHICKEN_CONFIG_H -DC_ENABLE_PTABLES -Os -fomit-frame-pointer -fPIC -DPIC -DC_SHARED -I/usr/local/include/chicken

Error: shell command failed with nonzero exit status 256:

  '/usr/local/bin/csc' -feature compiling-extension -setup-mode    -s -O2 -d1 iup.scm -j iup -j iup-base -j iup-controls -j iup-dialogs -j iup-glcanvas -j iup-glcontrols -j iup-plot -j iup-mglplot -j iup-pplot -j iup-scintilla -j iup-web -j iup-config -lcallback -liup -liupim -liupimglib -liupcontrols -liupmatrixex -liupgl -liupglcontrols -liup_plot -liup_mglplot -liup_pplot -liup_scintilla -liupweb


Error: shell command terminated with nonzero exit code
17920
"'/usr/local/bin/csi' -bnq -setup-mode -e \"(require-library setup-api)\" -e \"(...

I know it's pretty long but the error pops up just about at the end of the heap of output above.

1 Answers1

1

The real error here is iup.c:17:16: fatal error: im.h: No such file or directory, which is actually the C compiler complaining.

This error means either you don't have the development package for iup installed (system headers), or the C compiler cannot find the header files because it's in a nonstandard location. If it's the latter, you can try CSC_OPTIONS=-I/path/to/include chicken-install iup

Unfortunately, IUP itself is known to be a real pain to install, mostly because very few distros have packages for it. What you didn't say in your message is why exactly you need iup. Is this some kind of program you're trying to install, which uses CHICKEN plus IUP?

sjamaan
  • 2,282
  • 10
  • 19
  • 1
    how do i get the **development package** for iup? – Katanaka Kun Nov 13 '16 at 04:29
  • I'm trying to compile a tutorial Hello world program. But when I try to compile the .scm file with chicken it says there the module iup is not installed. So I hit chicken-install iup to install the missing module. And above is the error I get. Where exactly is im.h? Maybe -I will solve ir – Katanaka Kun Nov 13 '16 at 12:03
  • By development package I mean the package for your operating system. So if you do, for example, `apt-get install iup`, you would also need to do `apt-get install iup-dev` or something similar. – sjamaan Nov 14 '16 at 08:07
  • @sjamaan Unfortunately both of them do not exist. Which distribution do they exist on? (I am on Xubuntu 16.04). – Zelphir Kaltstahl May 22 '17 at 23:03
  • @zelphir How did you install iup? – sjamaan May 23 '17 at 07:01
  • @sjamaan I did not yet manage to install it. What I tried is `chicken-install iup`, which results in `fatal error: im.h: No such file or directory`. I found your answer here, but on my Xubuntu there seems to be no `iup-dev` or `iup` package either. I think I have to install `IM` as in https://webserver2.tecgraf.puc-rio.br/cd/en/building.html described in _Source Download_, but I hesitate to do that, because it would not be managed by apt, aptitude or chicken's package manager, as far as I can see and I don't want to be stuck with a load of not properly working IM stuff. – Zelphir Kaltstahl May 23 '17 at 08:12
  • Ah, yes. The packaging situation of IUP is terrible. I had thought that by now there would be a package in Ubuntu, but I guess not... I'm afraid you need to manually install from source. The `chicken-install` system is purely for installing CHICKEN code, it doesn't deal with 3rd party dependencies at all (which this is). In that sense, it works a lot like `pip` in Python, `bundler` in Ruby or `npm` in NodeJS. – sjamaan May 23 '17 at 12:11
  • @sjamaan I tired with `CSC_OPTIONS=-I/home/xiaolong/development/ChickenScheme/IM/precompiled/include sudo chicken-install iup`, which is where my downloaded precompiled version of IM is. However, same error pops up. Is something else needed with precompiled? I could not find any instructions on how to compile it (could not find a `configure`, `make` simply failed …), so I downloaded the precompiled. – Zelphir Kaltstahl May 24 '17 at 00:12
  • If you only installed IM, that's not enough; you need to install IUP as well (they're separate libraries, if I recall correctly). The command line you gave looks fine (assuming IM and IUP install headers in the same location), though I'm not sure sudo passes the `CSC_OPTIONS` to the child process' environment. – sjamaan May 24 '17 at 06:44
  • I guess I better make a new question for this. I tried now with `CSC_OPTIONS=-I/home/xiaolong/development/ChickenScheme/IM/pr‌​ecompiled/include chicken-install -p ~/.chicken-scheme/eggs/ iup`, so installing in a non-sudo needing location, where I set up a new repository of eggs, but still it says `im.h` missing. I also double checked the directory of the precompiled library. – Zelphir Kaltstahl May 25 '17 at 09:42