caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Build error w/ Findlib on Mandrake 10.1
@ 2005-05-30 22:50 Matt Gushee
  2005-05-31  8:22 ` [Caml-list] " Damien Bobillot
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Gushee @ 2005-05-30 22:50 UTC (permalink / raw)
  To: caml-list

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# -------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Build error w/ Findlib on Mandrake 10.1
  2005-05-30 22:50 Build error w/ Findlib on Mandrake 10.1 Matt Gushee
@ 2005-05-31  8:22 ` Damien Bobillot
  2005-05-31 17:29   ` Matt Gushee
  0 siblings, 1 reply; 3+ messages in thread
From: Damien Bobillot @ 2005-05-31  8:22 UTC (permalink / raw)
  To: Matt Gushee; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1311 bytes --]


Le 31 mai 05 à 00:50, Matt Gushee a écrit :


> 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 the file /usr/lib/ocaml/labltk/labltk.so.cmxa exists ? Or the  
file /usr/lib/ocaml//labltk/labltk.cmxa without ".so" ?

In my ocaml version, I don't have any .so in caml library names. Try  
to create a symlink from labltk.so.cmxa to labltk.cmxa

Good luck

-- 
Damien Bobillot



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2375 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Build error w/ Findlib on Mandrake 10.1
  2005-05-31  8:22 ` [Caml-list] " Damien Bobillot
@ 2005-05-31 17:29   ` Matt Gushee
  0 siblings, 0 replies; 3+ messages in thread
From: Matt Gushee @ 2005-05-31 17:29 UTC (permalink / raw)
  To: caml-list

Damien Bobillot wrote:

> Le 31 mai 05 à 00:50, Matt Gushee a écrit :

>>   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
> 
> Does the file /usr/lib/ocaml/labltk/labltk.so.cmxa exists ?

That's a good question. Based on the error messages, I presumed not, but 
I didn't specifically ask. But if that file did exist, what on earth 
would it be? As far as I know, there is no such thing as an '.so.cmxa' 
file, nor any reason for it to exist.

> Or the  file 
> /usr/lib/ocaml//labltk/labltk.cmxa without ".so" ?

Another good question; I'll try to find out.

> In my ocaml version, I don't have any .so in caml library names. Try  to 
> create a symlink from labltk.so.cmxa to labltk.cmxa

Hmm ... thank you, but that's a kludge, not a solution. What I would 
really like to find out is whether this error was caused by something 
under my control. If so, I'll fix it; if not, someone needs to report a 
bug to the Mandrake[*] team.

Anyway, thanks for the response.

--
Matt Gushee
Englewood, CO, USA

[*] Yes, I know, it's "Mandriva" now. I try to avoid that name--it
     always makes me think of apes with purple buttocks.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-05-31 17:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-30 22:50 Build error w/ Findlib on Mandrake 10.1 Matt Gushee
2005-05-31  8:22 ` [Caml-list] " Damien Bobillot
2005-05-31 17:29   ` Matt Gushee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).