[r-cran-yaml] 01/01: * debian/rules: remove convenience copy of libyaml sources before building, use system <yaml.h> in r-ext.c and implicit.c. * debian/control: add libyaml-dev to build depends.
Joost van Baal
joostvb at moszumanska.debian.org
Wed Jan 6 22:16:11 UTC 2016
This is an automated email from the git hooks/post-receive script.
joostvb pushed a commit to branch master
in repository r-cran-yaml.
commit c1d9091633d075db352461f8a755be9c0dc02b9d
Author: Joost van Baal-Ilić <joostvb at nusku.mdcc.cx>
Date: Wed Jan 6 23:16:03 2016 +0100
* debian/rules: remove convenience copy of libyaml sources before building, use system
<yaml.h> in r-ext.c and implicit.c.
* debian/control: add libyaml-dev to build depends.
---
debian/changelog | 215 +++++++++++++++++++++++++++++--------------------------
debian/rules | 5 ++
2 files changed, 120 insertions(+), 100 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 4989ba3..5d55c6b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,9 +3,19 @@ r-cran-yaml (2.1.13-3) unstable; urgency=low
* UNRELEASED
* debian/copyright: add upstream vcs at github and alternative upstream homepage at
http://biostat.mc.vanderbilt.edu/wiki/Main/YamlR as comments.
+ * debian/rules: remove convenience copy of libyaml sources before building, use system
+ <yaml.h> in r-ext.c and implicit.c.
+ * debian/control: add libyaml-dev to build depends.
* FIXME: http://cran.r-project.org/doc/manuals/R-admin.html#Customizing-package-compilation
REJECTED: embedded-library yaml.so
+
+ N: The given ELF object appears to have been statically linked to a
+ N: library.
+ ...
+ N: Refer to Debian Policy Manual section 4.13 (Convenience copies of code)
+ N: for details.
+
.
Description: This package implements the libyaml YAML 1.1 parser and emitter (http://pyyaml.org/wiki/LibYAML) for R.
.
@@ -18,98 +28,90 @@ r-cran-yaml (2.1.13-3) unstable; urgency=low
% cat src/Makevars
PKG_CPPFLAGS = -I. -DNDEBUG
-libyaml-dev: /usr/lib/x86_64-linux-gnu/libyaml.so
-
-libyaml-0-2 - Fast YAML 1.1 parser and emitter library
-libyaml-0-2: /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
-libyaml-0-2: /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
-
-
-we have
-src/yaml_private.h:#define YAML_VERSION_STRING "0.1.6"
-
-debian has
-Source: libyaml Version: 0.1.6-3
-
-
-joostvb at nusku:ding% diff -dur libyaml-0.1.6/src r-cran-yaml/src
-
-----------
-
-Само у r-cran-yaml/src: implicit.c
-Само у libyaml-0.1.6/src: Makefile.am
-Само у libyaml-0.1.6/src: Makefile.in
-Само у r-cran-yaml/src: Makevars
-Само у r-cran-yaml/src: r-ext.c
-Само у r-cran-yaml/src: r-ext.h
-diff -dur libyaml-0.1.6/src/scanner.c r-cran-yaml/src/scanner.c
---- libyaml-0.1.6/src/scanner.c 2016-01-06 16:30:38.000000000 +0100
-+++ r-cran-yaml/src/scanner.c 2015-12-22 10:47:20.297487439 +0100
-@@ -1106,6 +1106,13 @@
- && parser->indent == (ptrdiff_t)parser->mark.column);
-
- /*
-+ * A simple key is required only when it is the first token in the current
-+ * line. Therefore it is always allowed. But we add a check anyway.
-+ */
-+
-+ assert(parser->simple_key_allowed || !required); /* Impossible. */
-+
-+ /*
- * If the current position may start a simple key, save it.
- */
-
-Само у r-cran-yaml/src: yaml.h
-diff -dur libyaml-0.1.6/src/yaml_private.h r-cran-yaml/src/yaml_private.h
---- libyaml-0.1.6/src/yaml_private.h 2014-03-26 19:54:02.000000000 +0100
-+++ r-cran-yaml/src/yaml_private.h 2015-12-22 10:47:20.297487439 +0100
-@@ -1,9 +1,9 @@
-+#define YAML_VERSION_MAJOR 0
-+#define YAML_VERSION_MINOR 1
-+#define YAML_VERSION_PATCH 6
-+#define YAML_VERSION_STRING "0.1.6"
-
--#if HAVE_CONFIG_H
--#include <config.h>
--#endif
--
--#include <yaml.h>
-+#include "yaml.h"
-
- #include <assert.h>
- #include <limits.h>
-
-
-----------------
-
-
-diff -dur r-cran-yaml/src/yaml.h libyaml-0.1.6/include/yaml.h
---- r-cran-yaml/src/yaml.h 2015-12-22 10:47:20.297487439 +0100
-+++ libyaml-0.1.6/include/yaml.h 2014-03-26 19:54:02.000000000 +0100
-@@ -26,7 +26,17 @@
-
- /** The public API declaration. */
-
--#define YAML_DECLARE(type) type
-+#ifdef _WIN32
-+# if defined(YAML_DECLARE_STATIC)
-+# define YAML_DECLARE(type) type
-+# elif defined(YAML_DECLARE_EXPORT)
-+# define YAML_DECLARE(type) __declspec(dllexport) type
-+# else
-+# define YAML_DECLARE(type) __declspec(dllimport) type
-+# endif
-+#else
-+# define YAML_DECLARE(type) type
-+#endif
-
- /** @} */
-
-
-
+ libyaml-dev: /usr/lib/x86_64-linux-gnu/libyaml.so
+
+ libyaml-0-2 - Fast YAML 1.1 parser and emitter library
+ libyaml-0-2: /usr/lib/x86_64-linux-gnu/libyaml-0.so.2
+ libyaml-0-2: /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4
+
+
+ we have
+ src/yaml_private.h:#define YAML_VERSION_STRING "0.1.6"
+
+ debian has
+ Source: libyaml Version: 0.1.6-3
+
+ joostvb at nusku:ding% diff -dur libyaml-0.1.6/src r-cran-yaml/src
+
+ Само у r-cran-yaml/src: implicit.c
+ Само у libyaml-0.1.6/src: Makefile.am
+ Само у libyaml-0.1.6/src: Makefile.in
+ Само у r-cran-yaml/src: Makevars
+ Само у r-cran-yaml/src: r-ext.c
+ Само у r-cran-yaml/src: r-ext.h
+ diff -dur libyaml-0.1.6/src/scanner.c r-cran-yaml/src/scanner.c
+ --- libyaml-0.1.6/src/scanner.c 2016-01-06 16:30:38.000000000 +0100
+ +++ r-cran-yaml/src/scanner.c 2015-12-22 10:47:20.297487439 +0100
+ @@ -1106,6 +1106,13 @@
+ && parser->indent == (ptrdiff_t)parser->mark.column);
+
+ /*
+ + * A simple key is required only when it is the first token in the current
+ + * line. Therefore it is always allowed. But we add a check anyway.
+ + */
+ +
+ + assert(parser->simple_key_allowed || !required); /* Impossible. */
+ +
+ + /*
+ * If the current position may start a simple key, save it.
+ */
+
+ Само у r-cran-yaml/src: yaml.h
+ diff -dur libyaml-0.1.6/src/yaml_private.h r-cran-yaml/src/yaml_private.h
+ --- libyaml-0.1.6/src/yaml_private.h 2014-03-26 19:54:02.000000000 +0100
+ +++ r-cran-yaml/src/yaml_private.h 2015-12-22 10:47:20.297487439 +0100
+ @@ -1,9 +1,9 @@
+ +#define YAML_VERSION_MAJOR 0
+ +#define YAML_VERSION_MINOR 1
+ +#define YAML_VERSION_PATCH 6
+ +#define YAML_VERSION_STRING "0.1.6"
+
+ -#if HAVE_CONFIG_H
+ -#include <config.h>
+ -#endif
+ -
+ -#include <yaml.h>
+ +#include "yaml.h"
+
+ #include <assert.h>
+ #include <limits.h>
+
+ ----------------
+
+ diff -dur r-cran-yaml/src/yaml.h libyaml-0.1.6/include/yaml.h
+ --- r-cran-yaml/src/yaml.h 2015-12-22 10:47:20.297487439 +0100
+ +++ libyaml-0.1.6/include/yaml.h 2014-03-26 19:54:02.000000000 +0100
+ @@ -26,7 +26,17 @@
+
+ /** The public API declaration. */
+
+ -#define YAML_DECLARE(type) type
+ +#ifdef _WIN32
+ +# if defined(YAML_DECLARE_STATIC)
+ +# define YAML_DECLARE(type) type
+ +# elif defined(YAML_DECLARE_EXPORT)
+ +# define YAML_DECLARE(type) __declspec(dllexport) type
+ +# else
+ +# define YAML_DECLARE(type) __declspec(dllimport) type
+ +# endif
+ +#else
+ +# define YAML_DECLARE(type) type
+ +#endif
+
+ /** @} */
+
-------------------
-
our r-ext.h has:
#include "yaml.h"
@@ -153,29 +155,42 @@ gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic -g -O2 -f
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c r-ext.c -o r-ext.o
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o r-ext.o -L/usr/lib/R/lib -lR
-
....
-
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/joostvb/git/r-cran/r-cran-yaml-2.1.13/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
/home/joostvb/git/r-cran/r-cran-yaml-2.1.13/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so: undefined symbol: yaml_sequence_start_event_initialize
Error: loading failed
-(sid)joostvb at nusku:~/gi...n/r-cran-yaml-2.1.13/src% gcc -std=gnu99 -I/usr/share/R/include -I. -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c implicit.c -o implicit.o
-(sid)joostvb at nusku:~/gi...n/r-cran-yaml-2.1.13/src% ls
-implicit.c implicit.o Makevars r-ext.c r-ext.h yaml_private.h
+ (sid)joostvb at nusku:~/gi...n/r-cran-yaml-2.1.13/src% gcc -std=gnu99 -I/usr/share/R/include -I. -fpic -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -g -c implicit.c -o implicit.o
+ (sid)joostvb at nusku:~/gi...n/r-cran-yaml-2.1.13/src% ls
+ implicit.c implicit.o Makevars r-ext.c r-ext.h yaml_private.h
+
+ it compiles yaml.so without any error
+
+ this yaml.so is linked with
+
+ libR.so => /usr/lib/libR.so (0x00007f7614ddf000)
+
+ /usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4 is _not_ linked with libR.so
+
+ seems removing yaml sources before compiling, and shipping the thus build r-ified yaml.so is the best?
+
+R CMD INSTALL --no-clean-on-error
+
+
+MAKEFLAGS="LDFLAGS=-Wl,-z,relro" R CMD INSTALL -l /home/joostvb/git/r-cran/r-cran-yaml/debian/r-cran-yaml/usr/lib/R/site-library \
+ --clean .
-it compiles yaml.so without any error
+(sid)joostvb at nusku:~/git/r-cran/r-cran-yaml% MAKEFLAGS="LDFLAGS=-Wl,-z,relro" R CMD INSTALL -l /home/joostvb/git/r-cran/r-cran-yaml/debian/r-cran-yaml/usr/lib/R/site-library --clean .
-this yaml.so is linked with
- libR.so => /usr/lib/libR.so (0x00007f7614ddf000)
+(sid)joostvb at nusku:~/git/r-cran/r-cran-yaml% MAKEFLAGS="LDFLAGS=-Wl,-z,relro" R CMD INSTALL -l /home/joostvb/git/r-cran/r-cran-yaml/debian/r-cran-yaml/usr/lib/R/site-library --clean --no-clean-on-error .
-/usr/lib/x86_64-linux-gnu/libyaml-0.so.2.0.4 is _not_ linked with libR.so
+yields
-seems removing yaml sources before compiling, and shipping the thus build r-ified yaml.so is the best?
+debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so*
-- Joost van Baal-Ilić <joostvb at debian.org> Wed, 23 Dec 2015 15:52:52 +0100
diff --git a/debian/rules b/debian/rules
index 9b80aaa..7a40d29 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,6 +15,11 @@ makeFlags="LDFLAGS=$(LDFLAGS)"
include /usr/share/R/debian/r-cran.mk
+pre-build::
+ rm -vf src/api.c src/dumper.c src/emitter.c src/loader.c src/parser.c src/reader.c src/scanner.c src/writer.c src/yaml.h
+ sed -i 's/#include "yaml.h"/#include <yaml.h>/' src/implicit.c
+ sed -i 's/#include "yaml.h"/#include <yaml.h>/' src/r-ext.h
+
common-install-arch::
rm -vf $(debRlib)/$(cranNameOrig)/LICENSE $(debRlib)/$(cranNameOrig)/CHANGELOG $(debRlib)/$(cranNameOrig)/THANKS
dh_installdocs -p$(package) ./inst/THANKS
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-yaml.git
More information about the debian-science-commits
mailing list