Commits

Oliver Gu committed 7d53039

Renamed library to svm to resolve linker problem.

  • Participants
  • Parent commits a8b3131

Comments (0)

Files changed (10)

+2013-02-20: Renamed library to svm to resolve linker problem.
+            Thanks to Markus Mottl <markus.mottl@gmail.com> for this suggestion.
+
 2013-02-18: Complete rewrite by Oliver Gu <odietric@gmail.com>.
 
 2005-09-26: Initial release (0.1) by
 (* OASIS_START *)
-(* DO NOT EDIT (digest: f3b41f3a2e757d0e01fea16db73baf9c) *)
+(* DO NOT EDIT (digest: 0da94f6a806e2169c92934136b9aa7e7) *)
 This is the INSTALL file for the libsvm-ocaml distribution.
 
 This package uses OASIS to generate its build system. See section OASIS for
 In order to compile this package, you will need:
 * ocaml (>= 3.12) for all, test libsvm, doc API
 * findlib (>= 1.3.1)
-* core for library libsvm
-* lacaml for library libsvm
+* core for library svm
+* lacaml for library svm
 * sexplib for executable svm_cli
 
 Installing
 OASISFormat:       0.3
 Name:              libsvm-ocaml
-Version:           0.8
+Version:           0.8.1
 Synopsis:          libsvm-ocaml - OCaml bindings to the LIBSVM library
 Description:       libsvm-ocaml offers an OCaml-interface to the LIBSVM library
 Authors:           Oliver Gu <odietric@gmail.com>
 
 
 
-Library libsvm
+Library svm
   Path:           lib
   Findlibname:    libsvm
   Modules:        Libsvm
   MainIs:         xor.ml
   Install:        false
   BuildDepends:   libsvm
-  CompiledObject: byte
+  CompiledObject: native
 
 Executable svm_cli
   Path:           examples
   MainIs:         svm_cli.ml
   Install:        false
   BuildDepends:   libsvm,sexplib,sexplib.syntax
-  CompiledObject: byte
+  CompiledObject: native
 
 # Executable log
 #   Path:           examples
   MainIs:         svm_test.ml
   Install:        false
   BuildDepends:   libsvm
-  CompiledObject: byte
+  CompiledObject: native
 
 Test libsvm
   Run$:             flag(tests)
-  Command:          env CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc -where`/../stublibs $svm_test
+  # Command:          env CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc
+  # -where`/../stublibs $svm_test
+  Command:          $svm_test
   WorkingDirectory: .
 
 # Documentation
 <examples/svm_cli.ml{,i}>: syntax_camlp4o
 
 # OASIS_START
-# DO NOT EDIT (digest: c7487bde9da052de22383bad8e0143bc)
-# Ignore VCS directories, you can use the same kind of rule outside
-# OASIS_START/STOP if you want to exclude directories that contains
+# DO NOT EDIT (digest: 9b011639adf988aec7940bd79876ae3a)
+# Ignore VCS directories, you can use the same kind of rule outside 
+# OASIS_START/STOP if you want to exclude directories that contains 
 # useless stuff for the build process
 <**/.svn>: -traverse
 <**/.svn>: not_hygienic
 ".git": not_hygienic
 "_darcs": -traverse
 "_darcs": not_hygienic
-# Library libsvm
-"lib/libsvm.cmxs": use_libsvm
-<lib/*.ml{,i}>: oasis_library_libsvm_ccopt
-"lib/libsvm_stubs.c": oasis_library_libsvm_ccopt
-<lib/libsvm.{cma,cmxa}>: oasis_library_libsvm_cclib
-"lib/liblibsvm_stubs.lib": oasis_library_libsvm_cclib
-"lib/dlllibsvm_stubs.dll": oasis_library_libsvm_cclib
-"lib/liblibsvm_stubs.a": oasis_library_libsvm_cclib
-"lib/dlllibsvm_stubs.so": oasis_library_libsvm_cclib
-<lib/libsvm.{cma,cmxa}>: use_liblibsvm_stubs
+# Library svm
+"lib/svm.cmxs": use_svm
+<lib/*.ml{,i}>: oasis_library_svm_ccopt
+"lib/libsvm_stubs.c": oasis_library_svm_ccopt
+<lib/svm.{cma,cmxa}>: oasis_library_svm_cclib
+"lib/libsvm_stubs.lib": oasis_library_svm_cclib
+"lib/dllsvm_stubs.dll": oasis_library_svm_cclib
+"lib/libsvm_stubs.a": oasis_library_svm_cclib
+"lib/dllsvm_stubs.so": oasis_library_svm_cclib
+<lib/svm.{cma,cmxa}>: use_libsvm_stubs
 <lib/*.ml{,i}>: pkg_core
 <lib/*.ml{,i}>: pkg_lacaml
 "lib/libsvm_stubs.c": pkg_core
 "lib/libsvm_stubs.c": pkg_lacaml
 # Executable xor
-"examples/xor.byte": use_libsvm
-"examples/xor.byte": pkg_core
-"examples/xor.byte": pkg_lacaml
+"examples/xor.native": use_svm
+"examples/xor.native": pkg_core
+"examples/xor.native": pkg_lacaml
 # Executable svm_cli
-"examples/svm_cli.byte": use_libsvm
-"examples/svm_cli.byte": pkg_sexplib
-"examples/svm_cli.byte": pkg_sexplib.syntax
-"examples/svm_cli.byte": pkg_core
-"examples/svm_cli.byte": pkg_lacaml
-<examples/*.ml{,i}>: use_libsvm
+"examples/svm_cli.native": use_svm
+"examples/svm_cli.native": pkg_sexplib
+"examples/svm_cli.native": pkg_sexplib.syntax
+"examples/svm_cli.native": pkg_core
+"examples/svm_cli.native": pkg_lacaml
+<examples/*.ml{,i}>: use_svm
 <examples/*.ml{,i}>: pkg_sexplib
 <examples/*.ml{,i}>: pkg_sexplib.syntax
 <examples/*.ml{,i}>: pkg_core
 <examples/*.ml{,i}>: pkg_lacaml
 # Executable svm_test
-"test/svm_test.byte": use_libsvm
-"test/svm_test.byte": pkg_core
-"test/svm_test.byte": pkg_lacaml
-<test/*.ml{,i}>: use_libsvm
+"test/svm_test.native": use_svm
+"test/svm_test.native": pkg_core
+"test/svm_test.native": pkg_lacaml
+<test/*.ml{,i}>: use_svm
 <test/*.ml{,i}>: pkg_core
 <test/*.ml{,i}>: pkg_lacaml
 # OASIS_STOP
 # OASIS_START
-# DO NOT EDIT (digest: 5f8ff6c05f4cccc243bf0b09b4f01326)
+# DO NOT EDIT (digest: e5cadc18e631c2fdf0b94d729cd263a7)
 version = "0.8"
 description = "libsvm-ocaml - OCaml bindings to the LIBSVM library"
 requires = "core lacaml"
-archive(byte) = "libsvm.cma"
-archive(byte, plugin) = "libsvm.cma"
-archive(native) = "libsvm.cmxa"
-archive(native, plugin) = "libsvm.cmxs"
-exists_if = "libsvm.cma"
+archive(byte) = "svm.cma"
+archive(byte, plugin) = "svm.cma"
+archive(native) = "svm.cmxa"
+archive(native, plugin) = "svm.cmxs"
+exists_if = "svm.cma"
 # OASIS_STOP
 

File lib/libsvm_stubs.clib

+# OASIS_START
+# DO NOT EDIT (digest: 03501a3df9c73293dcb2a2f5f771d6f7)
+libsvm_stubs.o
+# OASIS_STOP

File lib/svm.mllib

+# OASIS_START
+# DO NOT EDIT (digest: 783233159827284c6b3895901840756f)
+Libsvm
+# OASIS_STOP

File myocamlbuild.ml

 (* OASIS_START *)
-(* DO NOT EDIT (digest: 495d0c00aaf37421e19c2136e43151f2) *)
+(* DO NOT EDIT (digest: a8225caa7721fbf7ad603ce6f9619518) *)
 module OASISGettext = struct
 # 21 "/home/ogu/src/ocaml/oasis-0.3.0/src/oasis/OASISGettext.ml"
 
 open Ocamlbuild_plugin;;
 let package_default =
   {
-     MyOCamlbuildBase.lib_ocaml = [("libsvm", ["lib"])];
-     lib_c = [("libsvm", "lib", [])];
+     MyOCamlbuildBase.lib_ocaml = [("svm", ["lib"])];
+     lib_c = [("svm", "lib", [])];
      flags =
        [
-          (["oasis_library_libsvm_ccopt"; "compile"],
+          (["oasis_library_svm_ccopt"; "compile"],
             [
                (OASISExpr.EBool true,
                  S
                       A "-DPIC"
                    ])
             ]);
-          (["oasis_library_libsvm_cclib"; "link"],
+          (["oasis_library_svm_cclib"; "link"],
             [(OASISExpr.EBool true, S [A "-cclib"; A "-lsvm"])]);
-          (["oasis_library_libsvm_cclib"; "ocamlmklib"; "c"],
+          (["oasis_library_svm_cclib"; "ocamlmklib"; "c"],
             [(OASISExpr.EBool true, S [A "-lsvm"])])
        ];
      includes = [("test", ["lib"]); ("examples", ["lib"])];
 (* setup.ml generated for the first time by OASIS v0.2.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 684600c96679254669075b69489649c2) *)
+(* DO NOT EDIT (digest: 2067b6f2b07ddc80c37903c0b7ae4686) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
             CustomPlugin.Test.main
               {
                  CustomPlugin.cmd_main =
-                   [
-                      (OASISExpr.EBool true,
-                        ("env",
-                          [
-                             "CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc";
-                             "-where`/../stublibs";
-                             "$svm_test"
-                          ]))
-                   ];
+                   [(OASISExpr.EBool true, ("$svm_test", []))];
                  cmd_clean = [(OASISExpr.EBool true, None)];
                  cmd_distclean = [(OASISExpr.EBool true, None)];
                  })
             CustomPlugin.Test.clean
               {
                  CustomPlugin.cmd_main =
-                   [
-                      (OASISExpr.EBool true,
-                        ("env",
-                          [
-                             "CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc";
-                             "-where`/../stublibs";
-                             "$svm_test"
-                          ]))
-                   ];
+                   [(OASISExpr.EBool true, ("$svm_test", []))];
                  cmd_clean = [(OASISExpr.EBool true, None)];
                  cmd_distclean = [(OASISExpr.EBool true, None)];
                  })
             CustomPlugin.Test.distclean
               {
                  CustomPlugin.cmd_main =
-                   [
-                      (OASISExpr.EBool true,
-                        ("env",
-                          [
-                             "CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc";
-                             "-where`/../stublibs";
-                             "$svm_test"
-                          ]))
-                   ];
+                   [(OASISExpr.EBool true, ("$svm_test", []))];
                  cmd_clean = [(OASISExpr.EBool true, None)];
                  cmd_distclean = [(OASISExpr.EBool true, None)];
                  })
             [
                Library
                  ({
-                     cs_name = "libsvm";
+                     cs_name = "svm";
                      cs_data = PropList.Data.create ();
                      cs_plugin_data = [];
                      },
                       bs_build = [(OASISExpr.EBool true, true)];
                       bs_install = [(OASISExpr.EBool true, false)];
                       bs_path = "examples";
-                      bs_compiled_object = Byte;
-                      bs_build_depends = [InternalLibrary "libsvm"];
+                      bs_compiled_object = Native;
+                      bs_build_depends = [InternalLibrary "svm"];
                       bs_build_tools =
                         [ExternalTool "ocamldoc"; ExternalTool "ocamlbuild"];
                       bs_c_sources = [];
                       bs_build = [(OASISExpr.EBool true, true)];
                       bs_install = [(OASISExpr.EBool true, false)];
                       bs_path = "examples";
-                      bs_compiled_object = Byte;
+                      bs_compiled_object = Native;
                       bs_build_depends =
                         [
-                           InternalLibrary "libsvm";
+                           InternalLibrary "svm";
                            FindlibPackage ("sexplib", None);
                            FindlibPackage ("sexplib.syntax", None)
                         ];
                       bs_build = [(OASISExpr.EBool true, true)];
                       bs_install = [(OASISExpr.EBool true, false)];
                       bs_path = "test";
-                      bs_compiled_object = Byte;
-                      bs_build_depends = [InternalLibrary "libsvm"];
+                      bs_compiled_object = Native;
+                      bs_build_depends = [InternalLibrary "svm"];
                       bs_build_tools =
                         [ExternalTool "ocamldoc"; ExternalTool "ocamlbuild"];
                       bs_c_sources = [];
                    {
                       test_type = (`Test, "custom", Some "0.3");
                       test_command =
-                        [
-                           (OASISExpr.EBool true,
-                             ("env",
-                               [
-                                  "CAML_LD_LIBRARY_PATH=./_build/lib:`ocamlc";
-                                  "-where`/../stublibs";
-                                  "$svm_test"
-                               ]))
-                        ];
+                        [(OASISExpr.EBool true, ("$svm_test", []))];
                       test_custom =
                         {
                            pre_command = [(OASISExpr.EBool true, None)];
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\138\190\159N|\196\254v\239\133C\202\242,\210P";
+     oasis_digest = Some "\133\239\132p\005\018\147'^K^\234@h\\\157";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 6034 "setup.ml"
+# 6002 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;
 #!/bin/bash
 
 # This script downloads the Astroparticle dataset mentioned in the SVM guide
-# www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf and exectues the second
+# www.csie.ntu.edu.tw/~cjlin/papers/guide/guide.pdf and executes the second
 # command set on page 9 with the OCaml command line interface.
 
 DATA_URL="http://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary"
 DATA_DIR="./data"
-SVM_CLI="./svm_cli.byte"
+SVM_CLI="./svm_cli.native"
 
 if [ ! -e "$DATA_DIR" ]
 then