Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] How to create a makefile for a project using libraries?

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] How to create a makefile for a project using libraries?


Chronological Thread 
  • From: Helmut Brandl <helmut.luis.brandl AT gmail.com>
  • To: Coq-Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] How to create a makefile for a project using libraries?
  • Date: Fri, 9 Feb 2018 21:37:16 -0600
  • Authentication-results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=helmut.luis.brandl AT gmail.com; spf=Pass smtp.mailfrom=helmut.luis.brandl AT gmail.com; spf=None smtp.helo=postmaster AT mail-wr0-f176.google.com
  • Ironport-phdr: 9a23:tpOYgRIWhLmpiZKBXdmcpTZWNBhigK39O0sv0rFitYgRIvnxwZ3uMQTl6Ol3ixeRBMOHs6sC07KempujcFRI2YyGvnEGfc4EfD4+ouJSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgppPOT1HZPZg9iq2+yo9JDffxhEiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLdQgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QLYpUjqg8qhrUgflhyUJNzA5/m/ZidF+grxHrx+6vRNz35TZbZuJOPZifK7Qe84RS2pbXsZWUixMGoGyYJULD+oEIOZYs5T2qkYUrRSkAwmjGefvwSJPi3/2w6I61+EhERza3AA6G9IOrXXUrM7vOKgJS+C61q/IwijHb/5N1jf97ZLHchElof2WQb1wds/RxFApGgjYgFuQronlMCmU1uQLq2Wb7uxgVfiui2E9sQ1xrCKvy8ExgYfKnoIY0k7I+Tl9zYovJtC1SFR3bcO6HJZTrS2WKol7T8IkTmp1oig10KcGtoS+fCUSyJQo2Rrfa/uffoiN+B3jVeKRLS52hXJ/ZL6znhiy/VWix+D9TMW031FKri1KktnIqH8BzQDc6s+CSvdl/0eh3yiA1xzL5+1aPUw5kbDXJp0hz7Iqi5Yfr0fOEjXrlEj0jaKabkAk9fKp6+TjbLXmvJicN4pshwH+LKsunsm/AfkkMgQUW2ib5OW81Kb58ULiWrVFlPs2nbTdsJ3BKsQbo7S2Aw5R0oo59xm/CDKm3MwCnXYbNFJFZA6Hj4/xNl7SJ/D4FO6zjEiokDd23P/LJabhA5XILnjbirjtZ7d960hGyAoy199T/ZxUCqtSaM70D2T2rZnzCgIze1i/xP+iA9Fg3KsfX3iOC+mXKvWBn0WP47cPLu2JeZNdkiz0LfQhr6rugHs8hENbebSoxt0dcnm+EvBOLECQYH6qidAERzRZ9jEiRfDn3QXRGQVYYGy/Cvplt2MLTbm+BIKGfbiDxbmI3SO1BJpTPzkUBVWFEHOufIKBCa5VNHCiZ/R5mzlBboCPDpc73Ej35gD/wrtjaOHT/39A7M+x5J1O/+TW0CoK23l0AsCaiT/fSmh1miYXXWdz0vkg/wpyzVCM1aU+iPtdR4Re

Hello list.

I have experimented a lot. It seems to me that all examples in the reference manual and in Chlipala's cpdt are broken. It is **not** correct to put '-R . Lib' into _CoqProject. You have to use a subdirectory instead of '.'.

After this minor but obviously very significant change my example works fine.

Is there any plan to update the reference manual. The actual behaviour of coq is very confusing if you just follow the manual. Or did I overlooked something?

Regards
Helmut

On Feb 9, 2018 19:14, "Helmut Brandl" <helmut.luis.brandl AT gmail.com> wrote:


On Feb 9, 2018 16:19, "Pierre Courtieu" <pierre.courtieu AT gmail.com> wrote:
Or you can just use -R options in _coqProject files?
P. 

Hi Pierre.

I have tried already the following:

Added "-R . Mylib" to the _CoqProject file of the library. Then issued 'make install' after successful compilation.

In the project using the common library I tried in the sourcefile 'Require Import Mylib.Name'.

Compiling the project I get '.../Mylib/Name.vo contains library Name and not Mylib.Name'.

Using only 'Require Import Name' does not work, because the compiler does not find it.

Regards
Helmut



Le ven. 9 févr. 2018 à 23:17, Théo Zimmermann <theo.zimmi AT gmail.com> a écrit :
Hi,

You probably want to use the $COQPATH environment variable instead. See https://coq.inria.fr/refman/commands.html#EnvVariables and https://coq.inria.fr/refman/gallina-ext.html#loadpath.

Regards,
Théo

Le ven. 9 févr. 2018 à 20:32, Helmut Brandl <helmut.brandl AT gmx.net> a écrit :
Hello coq-clubbers.

I have the following problem with the creation of a makefile:

- I have a coq library with several common function (i.e. a collection of *.v files). The libraries can be processed find with a proper _CoqProject file which as basically the list of source files. The program ‘coq_makefile’ generates a makefile whose usage by gnu make creates the corresponding *.vo files.

- I have two independent coq projects which want to use the library. The coq compiler needs some instructions on how to find the library objects. However for obvious reasons I don’t want to put ‘Add LoadPath’ statements into my source files.

Is there a generic way to solve this problem? Maybe the solution is so simple that I just don’t see it by reading the manual. Thanks for any hint.

Regards
Helmut




Archive powered by MHonArc 2.6.18.

Top of Page