How to use imtoolkit (precompiled/source) for Chicken Scheme? - compilation

In order to use iup in Chicken Scheme, I need to provide some dependencies. One of them is IM (imtoolkit), which I found on https://webserver2.tecgraf.puc-rio.br/cd/en/building.html , where it links me to sourceforge. From there I can download the source code to compile myself, but there are no instructions I could find how to do that and there is not the typical configure make make install structure, because there is no runnable configure. So I decided to use the precompiled version.
When I run sudo chicken-install iup I get the error:
iup.c:17:16: fatal error: im.h: No such file or directory
compilation terminated.
So I know I need IM somewhere. It is not in the repositories. In another question, I learned about specifying a path to a library when using chicken-install. This makes the command I try using CSC_OPTIONS=-I/home/xiaolong/development/ChickenScheme/IM/pr‌​ecompiled/include chicken-install -p ~/.chicken-scheme/eggs/ iup. However, still it results in the same error.
How can I use the precompiled library?
Note: Compiling it myself is still not totally out of the picture, if I could find any instructions on how to do it.
Info
OS: Xubuntu 16.04 64bit
Chicken Scheme version installed from the repositories:
CHICKEN
(c) 2008-2014, The Chicken Team
(c) 2000-2007, Felix L. Winkelmann
Version 4.9.0.1 (stability/4.9.0) (rev 8b3189b)
linux-unix-gnu-x86-64 [ 64bit manyargs dload ptables ]
bootstrapped 2014-06-07

Perhaps you can try this Makefile by Matthew Welland, for the Megatest UI. It's the only way I've ever got iup to work at all (on an Ubuntu box). Unfortunately, the Makefile is quite complex and it does a lot more than just install iup.
From what I can gather, it indeed downloads all the pre-built binaries of iup, im (imtoolkit) and cd (canvas draw), and it extracts them all into the same directory. Finally, it manually copies include files and shared objects around into the CHICKEN prefix. That's not exactly a best practice, but if it helps to get things up and running, maybe you can give it a shot. My advice would be to do it in a VM first, to avoid making too much of a mess on your main system.

Related

Unison creating different archives even when using same version

I have Unison 2.40.63 on both Windows and RHEL, all configs are working fine except when I try to run it first time it gives
Fatal error: Internal error: New archives are not identical.
Retaining original archives. Please run Unison again to bring them up to date.
First, just to cover our bases, I would check to make sure the same version of Unison is getting called on each machine. Unison 2.40.63 may be installed on both machines, but maybe there is a different version hiding in the PATH being called first. See unison -version.
That's probably not the issue though. This was a bug that cropped up before using older versions of Unison. See here and here. If I understand right it's because the versions of Unison were compiled with different versions of OCaml. Anyways:
There are much newer versions of Unison available. Unless you have a good reason to, I would upgrade. I'll bet this will solve your problem.
If you really really want version 2.40.63, then on each machine you'll have to first compile and install OCaml 3.12.1 from source, and then compile Unison 2.40.63 from source with OCaml and install it. This is what I had to do awhile ago to get things working with this version of Unison.

Installing Primer3

I need to install Primer3 for my research in Windows, and I really have no idea of how to go about it. I was following the instructions mentioned here.
I'm getting to the part where I need to run
mingw32-make TESTOPTS=--windows
and I keep getting an error saying:
'mingw32-make' is not recognized as an internal or external command,
operable program or batch file.
Just for reference, I went into the minGW Installation manager and got the ming32-make packages, including the bin, doc, lang, and lic ones, because I really had no idea which one was the correct one.
If someone could help me, I would be very grateful! Installing these niche programs without an installation wizard is a challenge!
You will need to install mingw32-make. This is a
Windows of port of GNU Make,
a software-build tool that is supported on all operating systems,
indeed the daddy of such tools.
But make alone will not suffice. To build primer3 you will
need a Windows port of the whole GNU toolchain for building software
from source code. Without that, running make by itself will
just expose the absence of the GCC compiler and linker that it
expects to do its bidding.
This is quite a lot of software, but it is easy and quick to install and there
are several open-source offerings. I suggest you go to TDM GCC
and download the TDM64 bundle. This will give you an executable installer.
Just run it and you will end up with the complete GNU toolchain, including,
mingw32-make, in your chosen installation directory.
It will also install in your Windows launch menu the MinGW command prompt.
Launch this and you will be presented with a Windows commandline console
with its environment set up to find and run any of the GNU tools.
In this console change directory to your primer3-X.Y.Z/test directory
and then run mingw32-make TESTOPTS=--windows as per documentation.
Be forwarned that the self-tests of primer3 that are executed to
verify the build may take 1/2 hr. to 1 hr. to run, depending on your
hardware, but they will finish successfully with the steps I've
described, barring problems specific to your machine. It is a foolproof-simple build.
All the built executables are deposited in the primer3-X.Y.Z/src
directory. You may want to move them somewhere more convenient
in in your PATH.
It does seem oddly amateurish that the documentation simply
directs you to run mingw32-make with no preliminary account of
what that is or how to install it, while on the other hand it
advises that you must install perl and strongly recommends a
specific perl distribution; but evidently primer3 is open-source
scientfic software and its documentation is not bad by the standard
of that genre.

Compiling Ghostscript 9.10 using mingw

I am using msys2 Mingw (gcc 4.8.2 for i686 32-bit) for building Ghostscript 9.10. After running make, gs.exe was created successfully. Followed by that I ran "make so" for creating libgs library. Libgs.so, Libgs.so.9.10 were created which are of the same file size. But I found both of them to be PE executables. After renaming extension to .exe, they produced the same output as done by gs.exe. What I require is libgs.dll, libgs.a to be created, but instead "make so" creates libgs.so which is in fact a PE executable. I also tried using patch found on site:https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-ghostscript/mingw-build.patch, but still the output remains the same. Has anyone been successful in this? Kindly help me.
I presume if you follow the steps taken in the build script connected to the patch you linked, everything will work out fine. I think most of it is just to make it use the "system"'s 3rd party libraries instead of those in the GS source. I'd guess running the configure command would do.
Alternatively, you could just download the MSYS2 base system from here, and do a pacman -Syu mingw-w64-i686-ghostscript. It should download and install the binary package without you having to build it yourself.
If you really want to build it yourself, download the PKGBUILD and patch, and run makepkg from the aforementioned MSYS2 shell and have that build it for you.
Have just completed testing of gs 9.15 built executables using the a patch
MINGW-packages-master.zip from https://github.com/Alexpux/MINGW-packages
Without implementing the zlib patch and PKGBUILD and using a MINGW 4.7.3 32/64
without by ghostscript used libs installed.
They did not work as is while using msys1 pathe'd up ahead of Windoze.
I simply edited the the MINGW Build and 32/64 bit type in makefile in
and set them to =1 there. and as i built without GTK defined in ./configure
SOC_LOADER_PLAIN manually to gs.c
Check the makefile after ./configure ahead of make or make so though , , .
All went well except for the COMPILE_INITS
mkromfs build that failed so I had to set that to =0 and build without that
feature. For me personally preferred as one can patch the gs fonts and libs
much easier.
The builds run as charm with full cpu optimisers implemented
only disabling gcse and guess-branch-probability, easily outperforming
the binaries provided by http://www.ghostscript.com/ by all means.
HPC !

Compile the most recent version of a package in an old system for local use

I need to know if it is possible to compile the best and newest package in an old, ancient system. Why? Well I'm limited at my company: I need to develop an application in an old Debian 3.0 server and I would prefer to use newer software to accomplish my task. Unfortunately, I'm not allowed to upgrade nor install any package.
Specifically, I want to parse XML files comfortably using xmlstarlet to do so. This server doesn't have it installed; if I download an older version of xmlstarlet supported by the system it's too old that I just lost the functionality I need. It just has three dependencies: libc6, libxml2 and libxslt1.1 (which are installed but are too ancient for a newer version of xmlstarlet)
So the question is: is there a way I can download this package and its dependencies (I think they are few and simple) and somehow compile them to work locally (not necessarily on the system's path, just in a working directory) without affecting in any way the legacy packages of the same name?
This system doesn't has PEAR either, nor PHP5, nor xmllint and I want to avoid coding in PHP4 to parse these XMLs. I really would like to work with xmlstarlet.
The answer to How to specify non-default shared-library path in GCC Linux? Getting "error while loading shared libraries" when running looks like it should work fine.
Or you could try static linking:
./configure --enable-static-libs

Overlay directory option while compiling kernel for Ubuntu 10.04

I am learning Linux kernel programming. I want to know what is --overlay-dir option while compiling linux kernel as mentioned on this pagehttp://crashcourse.ca/introduction-linux-kernel-programming/intermission-building-new-ubuntu-1004-kernel-free-lesson. Why cant I build kernel image by just the basic kernel. That page asks for downloading ubuntu maverick tree. What does the overlay directory contain? Is it required?
Also is there any other way to download that maverick kernel tree other than the git way? means if I could download some zip file otherwise the git takes a lot of time for downloading around 700 MB
The --overlay-dir flag is for the make-kpkg program, which is the Debian (and Ubuntu) way to make installable packages (.deb) from kernel sources. This lets you install and uninstall the kernels you build more easily. The --overlay-dir tells make-kpkg where to find the files that control how the package is made. This is sometimes referred to as the debian directory. See http://man.he.net/man1/make-kpkg for a manual page.
I don't know about downloading less. The "magic words" are download a snapshot, but as far as I know they have to be created at the server end so, if they don't exist, you're stuck with pulling the lot.

Resources