Re: Status of dh-r and problems building r-cran-yaml

2016-12-06 Thread Andreas Tille
Hi Gordon,

On Tue, Dec 06, 2016 at 05:08:00PM +0100, Gordon Ball wrote:
> >>> ** testing if installed package can be loaded
> >>> Error in dyn.load(file, DLLpath = DLLpath, ...) :.
> >>>   unable to load shared object 
> >>> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
> >>>   
> >>> /build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so:
> >>>  undefined symbol: yaml_emitter_set_indent_mapping_sequence
> >>> Error: loading failed
> >>> Execution halted
> >>> ERROR: loading failed
> >>> * removing 
> >>> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml'
> >>>
> >>>
> >>> I admit my poor wisdom ends here.  Any clue?
> >>
> >> Nothing from a quick look. I'll have a longer look tonight or tomorrow
> >> and see if I can spot anything.
> > 
> 
> The problem is that other files which are being removed in d/copyright
> Files-Excluded include local changes - both api.c and emitter.c, in
> addition to the changes you caught in yaml.h and yaml_private.h
> 
> api.c includes a definition of yaml_emitter_set_indent_mapping_sequence
> emitter.c modifies yaml_emitter_emit_block_sequence_item
> 
> It would be possible to disentangle this (remove these files, provide a
> new c file containing these functions, link with libyaml), but given
> they are patching the libyaml source linking against vanilla seems
> likely to cause ABI issues in future. I would consider reverting the
> DFSG version and just building all the included source files. Thoughts?

Thanks for the analysis.  So this might have changed in the latest
upstream version since the former packaging was removing those C files
at build time.  I admit that restoring the ABI after removing those code
copies is way more maintenance work than I'd be able (and willing) to
do.  So if nobody has a better idea it is probably the most sensible
thing to go with the full code copy.

Kind regards

   Andreas.

-- 
http://fam-tille.de



Re: Status of dh-r and problems building r-cran-yaml

2016-12-06 Thread Gordon Ball
 >>> However, yesterday I stumbled upon r-cran-yaml[1] which causes a
problem
>>> I was not able to solve quickly.  Upstream has injected an additional
>>> declaration to the code copy of libyaml which I injected via quilt patch
>>> right into the C code which now enables building the code.  Strangely
>>> enough the resulting library does not end up in the target directory
>>> location - or at least R can't find it there and the issue is hard to
>>> debug since at the point when the build process gets control again and I
>>> get a shell the files in questions are just removed by the Makefile:
>>>
>>> ** libs
>>> make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
>>> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g 
>>> -O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong 
>>> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
>>> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g 
>>> -O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong 
>>> -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
>>> gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o 
>>> r-ext.o -lyaml -L/usr/lib/R/lib -lR
>>> make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
>>> make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
>>> make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
>>> installing to 
>>> /build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs
>>> ** R
>>> ** inst
>>> ** preparing package for lazy loading
>>> ** help
>>> *** installing help indices
>>> ** building package indices
>>> ** testing if installed package can be loaded
>>> Error in dyn.load(file, DLLpath = DLLpath, ...) :.
>>>   unable to load shared object 
>>> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
>>>   
>>> /build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so:
>>>  undefined symbol: yaml_emitter_set_indent_mapping_sequence
>>> Error: loading failed
>>> Execution halted
>>> ERROR: loading failed
>>> * removing 
>>> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml'
>>>
>>>
>>> I admit my poor wisdom ends here.  Any clue?
>>
>> Nothing from a quick look. I'll have a longer look tonight or tomorrow
>> and see if I can spot anything.
> 
> That would be really nice.
> 

The problem is that other files which are being removed in d/copyright
Files-Excluded include local changes - both api.c and emitter.c, in
addition to the changes you caught in yaml.h and yaml_private.h

api.c includes a definition of yaml_emitter_set_indent_mapping_sequence
emitter.c modifies yaml_emitter_emit_block_sequence_item

It would be possible to disentangle this (remove these files, provide a
new c file containing these functions, link with libyaml), but given
they are patching the libyaml source linking against vanilla seems
likely to cause ABI issues in future. I would consider reverting the
DFSG version and just building all the included source files. Thoughts?

Gordon



Re: Status of dh-r and problems building r-cran-yaml

2016-12-05 Thread Dirk Eddelbuettel

On 5 December 2016 at 17:57, Gordon Ball wrote:
| On 01/12/16 09:46, Andreas Tille wrote:
| > However, yesterday I stumbled upon r-cran-yaml[1] which causes a problem
| > I was not able to solve quickly.  Upstream has injected an additional
| > declaration to the code copy of libyaml which I injected via quilt patch
| > right into the C code which now enables building the code.  Strangely
| > enough the resulting library does not end up in the target directory
| > location - or at least R can't find it there and the issue is hard to
| > debug since at the point when the build process gets control again and I
| > get a shell the files in questions are just removed by the Makefile:
| > 
| > ** libs
| > make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
| > gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g 
-O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
| > gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g 
-O2 -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
| > gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o 
r-ext.o -lyaml -L/usr/lib/R/lib -lR
| > make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
| > make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
| > make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
| > installing to 
/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs
| > ** R
| > ** inst
| > ** preparing package for lazy loading
| > ** help
| > *** installing help indices
| > ** building package indices
| > ** testing if installed package can be loaded
| > Error in dyn.load(file, DLLpath = DLLpath, ...) :.
| >   unable to load shared object 
'/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
| >   
/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so:
 undefined symbol: yaml_emitter_set_indent_mapping_sequence
| > Error: loading failed
| > Execution halted
| > ERROR: loading failed
| > * removing 
'/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml'
| > 
| > 
| > I admit my poor wisdom ends here.  Any clue?
| 
| Nothing from a quick look. I'll have a longer look tonight or tomorrow
| and see if I can spot anything.

Using (the command-line shorthand tool from my littler package)

  $ install.r yaml

on a shell works fine in Ubuntu 16.04 (at work) as well as in a quickly
fired-up Docker container (using the official r-base image I co-maintaim)
based on Debian testing (see below).

So it looks like it is not the yaml CRAN package. No smoking gun here :-/

Dirk


$ docker run --rm -ti r-base /bin/bash
root@44037b347f37:/# apt-get update
Get:1 http://security.debian.org testing/updates InRelease [68.2 kB]
Get:3 http://deb.debian.org/debian testing InRelease [175 kB]
Get:2 http://debian.gtisc.gatech.edu/debian sid InRelease [223 kB]
Get:4 http://deb.debian.org/debian testing-updates InRelease [88.5 kB]
Get:5 http://deb.debian.org/debian testing/main amd64 Packages [9,327 kB]
Get:6 http://debian.gtisc.gatech.edu/debian sid/main amd64 Packages [9,877
kB]
Fetched 19.8 MB in 4s (4,847 kB/s)
Reading package lists... Done
root@44037b347f37:/# install.r yaml
trying URL 'https://cran.rstudio.com/src/contrib/yaml_2.1.14.tar.gz'
Content type 'application/x-gzip' length 81095 bytes (79 KB)
==
downloaded 79 KB

* installing *source* package ‘yaml’ ...
** package ‘yaml’ successfully unpacked and MD5 sums checked
** libs
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2
*-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat
*-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c api.c -o
*api.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2
*-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat
*-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c dumper.c -o
*dumper.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2
*-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat
*-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c emitter.c -o
*emitter.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2
*-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat
*-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c implicit.c -o
*implicit.o
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2
*-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat
*-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c loader.c -o
*loader.o
gcc -std=gnu99 

Re: Status of dh-r and problems building r-cran-yaml

2016-12-05 Thread Gordon Ball
On 01/12/16 09:46, Andreas Tille wrote:
> Hi Gordon,
> 
> it seems you are quite busy currently since I have not heard from you
> since some time.  I decided to upload a new version of dh-r which is
> fixing some nasty bug (#846239).  I hope you are fine with the changes
> done by Dylan Aïssi and me.
>

Yes, sorry, I've been occupied by various things recently. The changes
look fine (and in any case, the package is marked as team maintained and
I'm fine with the team maintaining it).

> I have converted several packages from cdbs to dh-r with no visible
> problems so far.  The usage of ${R:Depends} is very convenient and IMHO
> increases the quality of packages since it makes sure no (versioned)
> dependency will be forgotten in the binary package dependency list (I
> noticed some examples that were definitely wrong before).
> 

Good to hear. Did you find any other cases in which existing variables
would have been useful (as you reported in #842092), or any other
recurrent packaging issues which should be added to dh-r?

> However, yesterday I stumbled upon r-cran-yaml[1] which causes a problem
> I was not able to solve quickly.  Upstream has injected an additional
> declaration to the code copy of libyaml which I injected via quilt patch
> right into the C code which now enables building the code.  Strangely
> enough the resulting library does not end up in the target directory
> location - or at least R can't find it there and the issue is hard to
> debug since at the point when the build process gets control again and I
> get a shell the files in questions are just removed by the Makefile:
> 
> ** libs
> make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2 
> -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
> -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
> gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2 
> -fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
> -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
> gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o 
> r-ext.o -lyaml -L/usr/lib/R/lib -lR
> make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
> make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
> make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
> installing to 
> /build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs
> ** R
> ** inst
> ** preparing package for lazy loading
> ** help
> *** installing help indices
> ** building package indices
> ** testing if installed package can be loaded
> Error in dyn.load(file, DLLpath = DLLpath, ...) :.
>   unable to load shared object 
> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
>   
> /build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so:
>  undefined symbol: yaml_emitter_set_indent_mapping_sequence
> Error: loading failed
> Execution halted
> ERROR: loading failed
> * removing 
> '/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml'
> 
> 
> I admit my poor wisdom ends here.  Any clue?

Nothing from a quick look. I'll have a longer look tonight or tomorrow
and see if I can spot anything.

Thanks for all your efforts keeping R packages updated.

> 
> Kind regards
> 
> Andreas.
> 
> [1] https://anonscm.debian.org/git/debian-science/packages/r-cran-yaml.git
> 



Status of dh-r and problems building r-cran-yaml

2016-12-01 Thread Andreas Tille
Hi Gordon,

it seems you are quite busy currently since I have not heard from you
since some time.  I decided to upload a new version of dh-r which is
fixing some nasty bug (#846239).  I hope you are fine with the changes
done by Dylan Aïssi and me.

I have converted several packages from cdbs to dh-r with no visible
problems so far.  The usage of ${R:Depends} is very convenient and IMHO
increases the quality of packages since it makes sure no (versioned)
dependency will be forgotten in the binary package dependency list (I
noticed some examples that were definitely wrong before).

However, yesterday I stumbled upon r-cran-yaml[1] which causes a problem
I was not able to solve quickly.  Upstream has injected an additional
declaration to the code copy of libyaml which I injected via quilt patch
right into the C code which now enables building the code.  Strangely
enough the resulting library does not end up in the target directory
location - or at least R can't find it there and the issue is hard to
debug since at the point when the build process gets control again and I
get a shell the files in questions are just removed by the Makefile:

** libs
make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2 
-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
gcc -std=gnu99 -I/usr/share/R/include -DNDEBUG -I. -DNDEBUG -fpic  -g -O2 
-fdebug-prefix-map=/build/r-base-3.3.2=. -fstack-protector-strong -Wformat 
-Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -
gcc -std=gnu99 -shared -L/usr/lib/R/lib -Wl,-z,relro -o yaml.so implicit.o 
r-ext.o -lyaml -L/usr/lib/R/lib -lR
make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
make[1]: Entering directory '/build/r-cran-yaml-2.1.14+dfsg/src'
make[1]: Leaving directory '/build/r-cran-yaml-2.1.14+dfsg/src'
installing to 
/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :.
  unable to load shared object 
'/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so':
  
/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml/libs/yaml.so:
 undefined symbol: yaml_emitter_set_indent_mapping_sequence
Error: loading failed
Execution halted
ERROR: loading failed
* removing 
'/build/r-cran-yaml-2.1.14+dfsg/debian/r-cran-yaml/usr/lib/R/site-library/yaml'


I admit my poor wisdom ends here.  Any clue?

Kind regards

Andreas.

[1] https://anonscm.debian.org/git/debian-science/packages/r-cran-yaml.git

-- 
http://fam-tille.de