From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 9BFA1BDD8 for ; Fri, 26 Aug 2005 14:00:46 +0200 (CEST) Received: from metux.de (seven.metux.de [193.16.1.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j7QC0iVP009241 for ; Fri, 26 Aug 2005 14:00:45 +0200 Received: (from weigelt@localhost) by metux.de (8.12.10/8.12.10) id j7QC0gQo022193 for caml-list@yquem.inria.fr; Fri, 26 Aug 2005 14:00:42 +0200 Date: Fri, 26 Aug 2005 14:00:42 +0200 From: Enrico Weigelt To: caml-list@yquem.inria.fr Subject: crosscompile problem Message-ID: <20050826120042.GA9061@nibiru.local> Reply-To: weigelt@metux.de Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline User-Agent: Mutt/1.4.1i X-j-chkmail-Score: MSGID : 430F046C.000 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 430F046C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 sizeof:01 bypassing:01 distro:01 autoconf:01 config:01 stdout:01 config:01 sed:01 sed:01 longlong:01 doesnt:98 ...:98 cellphone:98 rewrite:01 X-Attachments: name="buildconf-query" name="buildconf.db" X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi folks, it seems that crosscompiling ocaml is currently impossible. The whole ./configure stuff heavily relies on running several test programs checking target stuff (ie. sizeof()). Of course this cannot work on cross targets. I started to add some options for bypassing such tests, ie. --32bit and --64bit, but this doesnt go far enough and also requires distro builders to add special fixes for this package on every target. Since almost all packages have to cope with this problem and also widely used buildsystems like autoconf also have no clean way of handling this, I suggest moving away this configuration from individual packages to some central point - an global config database. We query this database by simply calling some given commandline with the variable name as parameter. The value is simply printed out on stdout, without linefeed. For example to get some type sizes: /opt/xcompiler/minibox/bin/buildconf-query host.ansi-c.sizes.long This can be easily solved by a tiny shellscript and some carefully maintained text database. (see attachement) I'll now starting to rewrite the configure script ... cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- -- DSL ab 0 Euro. -- statische IP -- UUCP -- Hosting -- Webshops -- --------------------------------------------------------------------- --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=buildconf-query #!/bin/bash DB=/install/config/systems/jail/etc/buildconf/buildconf.db if [ ! "$1" ]; then echo "$0 "; exit 1; fi QUERY="$1"; OUT=`cat $DB | grep -E "^$QUERY:" | sed -e "s/^$QUERY://;" | sed 's/ / /g;' | sed "s/^ *//"` echo -n "$OUT" --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="buildconf.db" ### system build configuration stuff for: JAIL (HOMER) host.cpu.family: x86 host.cpu.type: athlon-xp host.cpu.has-mmx: yes host.cpu.has-mmx2: yes host.name: jail host.ansi-c.sizes.short: 2 host.ansi-c.sizes.long: 4 host.ansi-c.sizes.longlong: 8 --oyUTqETQ0mS9luUI--