Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Matt Gushee <mgushee@havenrock.com>
To: caml-list@inria.fr
Subject: Build error w/ Findlib on Mandrake 10.1
Date: Mon, 30 May 2005 16:50:44 -0600	[thread overview]
Message-ID: <429B98C4.10806@havenrock.com> (raw)

Hello, all--

A user of my Bantam file manager has reported a very strange compilation 
error:

   ocamlfind ocamlopt -package "unix str labltk" -c common.ml
   ocamlfind ocamlopt -package "unix str labltk" -c util.ml
   ocamlfind ocamlopt -package "unix str labltk" -c config.ml
   ocamlfind ocamlopt -package "unix str labltk" -c images.ml
   ocamlfind ocamlopt -package "unix str labltk" -c bantam.ml
   ocamlfind ocamlopt -package "unix str labltk" -linkpkg -o bantam.bin \
     common.cmx util.cmx config.cmx images.cmx bantam.cmx
   Cannot find file /usr/lib/ocaml//labltk/labltk.so.cmxa
   make: *** [opt] Error 2

This user is not very familiar with OCaml; he is using the Mandrake 10.1 
RPM(s).

Although I suspect there was an error on the part of whoever packaged 
OCaml (or Findlib) for Mandrake, perhaps there is an error on my part. 
Just in case, I have included my Makefiles below.

Does anyone have an idea what's wrong? I'd appreciate any suggestions.

--
Matt Gushee
Englewood, CO, USA


-- Makefile ----------------------------------------------------------
BANTAM_HOME = /usr/local
BINDIR = $(BANTAM_HOME)/bin
LIBDIR = $(BANTAM_HOME)/lib/bantam
DATADIR = $(BANTAM_HOME)/share/bantam

DEFAULT_TARGET = opt

#SRCS = bantam.ml
#BYTE_OBJS = $(SRCS:.ml=.cmo)
#NAT_OBJS = $(SRCS:.ml=.cmx)

include Makefile.build

.PHONY : all byte opt install clean test

install :
	install -d $(BINDIR)
	$$(for sub in config scripts; do \
		install -d $(DATADIR)/skeleton/$$sub; \
	done)
	install bantam.bin $(BINDIR)
	install bantam.sh $(BINDIR)/bantam
	install -m 644 skeleton/config/* $(DATADIR)/skeleton/config
	install skeleton/scripts/* $(DATADIR)/skeleton/scripts
	install -m 644 VERSION $(DATADIR)

clean :
	-rm -f *.cm? *.o *.a bantam.ml
	-rm -rf testdata

distclean : clean
	-rm -f Makefile* bantam.sh *.ml

realclean : clean
	-rm -f bantam bantam.sh bantam.bin

test :
	#export BANTAM_USER_DIR=./skeleton
	#export PATH=$$BANTAM_USER_DIR/scripts:$$PATH
	#export BANTAM_BINDIR=.
	#export BANTAM_DATA=.
	#exec bantam.bin
	cp -R skeleton testdata
	BANTAM_USER_DIR=./testdata PATH=./testdata/scripts:$$PATH \
           ./bantam.bin
-- #EOF# -------------------------------------------------------------

-- Makefile.build ----------------------------------------------------
OCAMLC = ocamlc
OCAMLOPT = ocamlopt
OCAMLFIND = ocamlfind

BASE_SRCS = common.ml util.ml bConfig.ml images.ml
SRCS = $(BASE_SRCS) bantam_.ml
BASE_BYTE_OBJS = $(BASE_SRCS:.ml=.cmo)
BYTE_OBJS = $(BASE_BYTE_OBJS) bantam.cmo
NAT_OBJS = $(BASE_SRCS:.ml=.cmx) bantam.cmx
DEPS = "unix str labltk"

RELIEF = $(shell bash -c '\
	version=`ocamlc -version`; \
	major=$${version:0:4}; \
	minor=$${version:5}; \
	if [ $$major = "3.08" ] && [ $$minor ] && [ $$minor -ge 3 ]; then \
		echo "Solid"; \
	else \
		echo "Flat"; \
	fi' )

.PHONY : all byte opt install clean

all : $(DEFAULT_TARGET)

opt : $(NAT_OBJS) bantam.sh
	$(OCAMLFIND) $(OCAMLOPT) -package $(DEPS) -linkpkg -o bantam.bin 
$(NAT_OBJS)

byte : $(BYTE_OBJS) bantam.sh
	$(OCAMLFIND) $(OCAMLC) -package $(DEPS) -linkpkg -o bantam.bin $(BYTE_OBJS)

bantam.sh : bantam.sh.0 bantam.sh.2
	-rm -f bantam.sh
	cat bantam.sh.0 >> bantam.sh
	echo "    BANTAM_HOME=$(BANTAM_HOME)" >> bantam.sh
	cat bantam.sh.2 >> bantam.sh

bantam.cmx : bantam.ml
	#$(OCAMLFIND) $(OCAMLOPT) -package $(DEPS) \
	#	-pp "camlp4o pa_ifdef.cmo $(SOLID)" -c $<
	$(OCAMLFIND) $(OCAMLOPT) -package $(DEPS) -c $<

bantam.cmo : bantam.ml
	#$(OCAMLFIND) $(OCAMLC) -package $(DEPS) \
	#	-pp "camlp4o pa_ifdef.cmo $(SOLID)" -c $<
	$(OCAMLFIND) $(OCAMLC) -package $(DEPS) -c $<

bantam.ml : bantam_.ml
	sed "s/@RELIEF@/$(RELIEF)/" bantam_.ml >bantam.ml

%.cmx : %.ml
	$(OCAMLFIND) $(OCAMLOPT) -package $(DEPS) -c $<

%.cmo : %.ml
	$(OCAMLFIND) $(OCAMLC) -package $(DEPS) -c $<
-- #EOF# -------------------------------------------------------------


             reply	other threads:[~2005-05-30 22:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-30 22:50 Matt Gushee [this message]
2005-05-31  8:22 ` [Caml-list] " Damien Bobillot
2005-05-31 17:29   ` Matt Gushee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=429B98C4.10806@havenrock.com \
    --to=mgushee@havenrock.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox