From: Conglun Yao <yaoconglun@gmail.com>
To: Richard Jones <rich@annexia.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Dynlink and ocamlfind for camlp4 3.11?
Date: Sun, 4 Oct 2009 21:06:47 +0100 [thread overview]
Message-ID: <f7b50d2a0910041306g2219c354na505e5fbce4e0069@mail.gmail.com> (raw)
In-Reply-To: <f7b50d2a0910041253k4b33e67cvf8190197c2cbc50e@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 1038 bytes --]
On Sun, Oct 4, 2009 at 8:53 PM, Conglun Yao <yaoconglun@gmail.com> wrote:
>
>
>>
>> In that case, try listing dynlink explicitly, like:
>>
>> ocamlfind ocamlc dynlink.cma -package json-static [etc]
>>
>
> $ ocamlfind ocamlc dynlink.cma -package json-static -syntax camlp4o -c
> test.ml
>
> $ ocamlfind ocamlc -I /home/conglun/godi/lib/ocaml/pkg-lib/camlp4
> dynlink.cma -package json-static -syntax camlp4o -c t.ml
>
>
> Error: Error while linking
> /home/conglun/godi/lib/ocaml/std-lib/camlp4/camlp4lib.cma(Camlp4):
> Reference to undefined global `Dynlink'
>
>
>>
>> Anyhow, it sounds like a bug in the META files that are supplied with
>> your cygwin OCaml distribution.
>>
>>
> I think you are right, the problem happens on the camlp4o or cygwin, which
> can't load dynlink. But I can't find problem in the camlp4's META (in the
> attachment)
>
> Thanks,
>
> Conglun
>
However, if I do the following test, it works fine.
test.ml
let x = 1
let _ = print_int x
ocamlfind ocamlc -package camlp4 -syntax camlp4o -c t.ml
[-- Attachment #1.2: Type: text/html, Size: 2027 bytes --]
[-- Attachment #2: META --]
[-- Type: application/octet-stream, Size: 4889 bytes --]
# Specifications for the "camlp4" preprocessor:
requires = ""
version = "[distributed with Ocaml]"
description = "Base for Camlp4 syntax extensions"
directory = "/home/conglun/godi/lib/ocaml/std-lib/camlp4"
# For the toploop:
requires(byte,toploop) = "dynlink"
archive(byte,toploop,camlp4o) = "camlp4o.cma"
archive(byte,toploop,camlp4r) = "camlp4r.cma"
# For the preprocessor itself:
archive(syntax,preprocessor,camlp4o) = "-parser o -parser op -printer p"
archive(syntax,preprocessor,camlp4r) = "-parser r -parser rp -printer p"
preprocessor = "safe_camlp4"
package "lib" (
requires = "camlp4 dynlink"
version = "[distributed with Ocaml]"
description = "Camlp4 library"
archive(byte) = "camlp4lib.cma"
archive(byte,toploop) = "" # already contained in camlp4*.cma
archive(native) = "camlp4lib.cmxa"
)
package "gramlib" (
requires = "camlp4.lib"
version = "[distributed with Ocaml]"
description = "Compatibilty name for camlp4.lib"
)
package "quotations" (
version = "[distributed with Ocaml]"
description = "Syntax extension: Quotations to create AST nodes"
requires = "camlp4.quotations.r" # backward compat
archive(syntax,preprocessor) = "-ignore foo"
package "o" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax extension: Quotations to create AST nodes (original syntax)"
archive(syntax,preprocessor) = "-parser Camlp4QuotationCommon -parser Camlp4OCamlOriginalQuotationExpander"
archive(syntax,toploop) = "Camlp4Parsers/Camlp4QuotationCommon.cmo Camlp4Parsers/Camlp4OCamlOriginalQuotationExpander.cmo"
)
package "r" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax extension: Quotations to create AST nodes (revised syntax)"
archive(syntax,preprocessor) = "-parser Camlp4QuotationCommon -parser Camlp4OCamlRevisedQuotationExpander"
archive(syntax,toploop) = "Camlp4Parsers/Camlp4QuotationCommon.cmo Camlp4Parsers/Camlp4OCamlRevisedQuotationExpander.cmo"
)
)
package "extend" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax extension: EXTEND the camlp4 grammar"
archive(syntax,preprocessor) = "-parser Camlp4GrammarParser"
archive(syntax,toploop) = "Camlp4Parsers/Camlp4GrammarParser.cmo"
)
package "listcomprehension" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax extension for list comprehensions"
archive(syntax,preprocessor) = "-parser Camlp4ListComprehension"
archive(syntax,toploop) = "Camlp4Parsers/Camlp4ListComprehension.cmo"
)
package "macro" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax extension: Conditional compilation"
archive(syntax,preprocessor) = "-parser Camlp4MacroParser"
archive(syntax,toploop) = "Camlp4Parsers/Camlp4MacroParser.cmo"
)
package "mapgenerator" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Traverse data structure (map style)"
archive(syntax,preprocessor) = "-filter Camlp4MapGenerator"
archive(syntax,toploop) = "Camlp4Filters/Camlp4MapGenerator.cmo"
)
package "foldgenerator" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Traverse data structure (fold style)"
archive(syntax,preprocessor) = "-filter Camlp4FoldGenerator"
archive(syntax,toploop) = "Camlp4Filters/Camlp4FoldGenerator.cmo"
)
package "metagenerator" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Generate AST generator for data structure"
archive(syntax,preprocessor) = "-filter Camlp4MetaGenerator"
archive(syntax,toploop) = "Camlp4Filters/Camlp4MetaGenerator.cmo"
)
package "locationstripper" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Remove location info from AST"
archive(syntax,preprocessor) = "-filter Camlp4LocationStripper"
archive(syntax,toploop) = "Camlp4Filters/Camlp4LocationStripper.cmo"
)
package "tracer" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Trace execution"
archive(syntax,preprocessor) = "-filter Camlp4Tracer"
archive(syntax,toploop) = "Camlp4Filters/Camlp4Tracer.cmo"
)
package "exceptiontracer" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Trace exception execution"
archive(syntax,preprocessor) = "-filter Camlp4ExceptionTracer"
archive(syntax,toploop) = "Camlp4Filters/Camlp4ExceptionTracer.cmo"
)
package "profiler" (
requires = "camlp4"
version = "[distributed with Ocaml]"
description = "Syntax filter: Count events during execution"
archive(syntax,preprocessor) = "-filter Camlp4Profiler"
archive(syntax,toploop) = "Camlp4Filters/Camlp4Profiler.cmo"
archive(byte) = "camlp4prof.cmo"
archive(native) = "camlp4prof.cmx"
)
next prev parent reply other threads:[~2009-10-04 20:06 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-04 14:22 Conglun Yao
2009-10-04 14:24 ` Conglun Yao
2009-10-04 19:05 ` [Caml-list] " Richard Jones
2009-10-04 19:32 ` Conglun Yao
2009-10-04 19:37 ` Richard Jones
2009-10-04 19:53 ` Conglun Yao
2009-10-04 20:06 ` Conglun Yao [this message]
2009-10-04 20:33 ` Richard Jones
2009-10-04 20:35 ` Richard Jones
2009-10-04 21:14 ` David Allsopp
2009-10-04 21:40 ` Conglun Yao
2009-10-05 7:39 ` David Allsopp
2009-10-05 10:14 ` Conglun Yao
2009-10-05 13:35 ` Gerd Stolpmann
2009-10-05 15:17 ` Conglun Yao
2009-10-05 17:28 ` David Allsopp
2009-10-05 17:55 ` Alain Frisch
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=f7b50d2a0910041306g2219c354na505e5fbce4e0069@mail.gmail.com \
--to=yaoconglun@gmail.com \
--cc=caml-list@yquem.inria.fr \
--cc=rich@annexia.org \
/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