Re: [Rd] patch about mingwbuild 4.9.1

2014-07-20 Thread Prof Brian Ripley
I think you used the wrong code model: these come from defaulting to the 
medium-code model intended for x64 Cygwin -- see 
https://gcc.gnu.org/ml/gcc-patches/2013-03/msg00858.html .


Also, please follow the posting guide and do not send HTML: your message 
arrived rather garbled.


I've added a more general way to achieve this in MkRules.dist in R-devel 
and R-patched.


On 19/07/2014 07:52, Yu Gong wrote:

recently I used gcc 4.9.1 
(http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting 
Win64/Personal Builds/mingw-builds/)on windows to build R,but failed when link 
R.dll ,it report linker status 5.Â
after some digging, I found when use gcc 4.9.1 64 bit on windows there are lots 
of .refptr.*(* is r function name) in R.def, which lead build fail.so I add a 
simple path to src/gnuwin32/Makefile:

Index: Makefile
===
--- Makefile(版本 66200)
+++ Makefile(工作副本)
@@ -148,7 +148,7 @@
 ifeq "$(WIN)" "64"
 R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
 @$(ECHO) EXPORTS > R.def
-@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq > R0.def
+@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq |$(SED) 
'/.refptr./d' > R0.def
 @$(SED) -e's/@.*//' Rdll.hide | LC_COLLATE=C $(SORT) > R1.def
 @LC_COLLATE=C comm -23 R0.def R1.def >> R.def
 $(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) 
$(DLLLIBS)
@@ -156,7 +156,7 @@
 else
 R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
 @$(ECHO) EXPORTS > R.def
-@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq > R0.def
+@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq |$(SED) 
'/.refptr./d' > R0.def
 @LC_COLLATE=C $(SORT) Rdll.hide > R1.def
 @LC_COLLATE=C comm -23 R0.def R1.def >> R.def
 $(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) 
$(DLLLIBS)


Yu Gong
2014/07/18
[[alternative HTML version deleted]]



__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel




--
Brian D. Ripley,  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel:  +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UKFax:  +44 1865 272595

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


Re: [Rd] patch about mingwbuild 4.9.1

2014-07-20 Thread Yu Gong
thanks for you answer, I didn't realize mingw-w64 already change default code 
model. 
I found one more file also need change,otherwise package build will fail. the 
file is  share/make/winshlib.mk .


  $(NM) $^ | $(SED) -n $(SYMPAT)|$(SED) -n '/.refptr./d'   | $(SED) -n 
's/.refptr*//g'   >> tmp.def; \

Yu Gong
On Sunday, July 20, 2014 8:35 PM, Prof Brian Ripley  
wrote:
 


I think you used the wrong code model: these come from defaulting to the 
medium-code model intended for x64 Cygwin -- see 
https://gcc.gnu.org/ml/gcc-patches/2013-03/msg00858.html .

Also, please follow the posting guide and do not send HTML: your message 
arrived rather garbled.

I've added a more general way to achieve this in MkRules.dist in R-devel 
and R-patched.

On 19/07/2014 07:52, Yu Gong wrote:
> recently I used gcc 4.9.1 
> (http://sourceforge.net/projects/mingw-w64/files/Toolchains targetting 
> Win64/Personal Builds/mingw-builds/)on windows to build R,but failed when 
> link R.dll ,it report linker status 5.Â
> after some
 digging, I found when use gcc 4.9.1 64 bit on windows there are lots of 
.refptr.*(* is r function name) in R.def, which lead build fail.so I add a 
simple path to src/gnuwin32/Makefile:
>
> Index: Makefile
> ===
> --- Makefile(版本 66200)
> +++ Makefile(工作副本)
> @@ -148,7 +148,7 @@
> Â ifeq "$(WIN)" "64"
> Â R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
> Â @$(ECHO) EXPORTS > R.def
> -@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq > R0.def
> +@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq |$(SED) 
> '/.refptr./d' > R0.def
> Â @$(SED) -e's/@.*//' Rdll.hide | LC_COLLATE=C
 $(SORT) > R1.def
> Â @LC_COLLATE=C comm -23 R0.def R1.def >> R.def
> Â $(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) 
> $(DLLLIBS)
> @@ -156,7 +156,7 @@
> Â else
> Â R.dll: $(OBJS) $(OBJS-EXTRA) $(MAINLIBS) $(EXTRALIBS) dllversion.o
> Â @$(ECHO) EXPORTS > R.def
> -@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq > R0.def
> +@$(NM) $^ | $(SED) -n  $(SYMPAT) | LC_COLLATE=C $(SORT) | uniq |$(SED) 
> '/.refptr./d' > R0.def
> Â @LC_COLLATE=C $(SORT) Rdll.hide > R1.def
> Â @LC_COLLATE=C comm -23 R0.def R1.def >> R.def
> Â $(DLL) -shared $(DLLFLAGS) $($*-DLLFLAGS) -o $@ R.def $^ $($*-DLLLIBS) 
> $(DLLLIBS)

>
>
> Yu Gong
> 2014/07/18
>     [[alternative HTML version deleted]]
>
>
>
> __
> R-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>


-- 
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
[[alternative HTML version deleted]]

__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel


[Rd] Unlisting Nested Lists of Factors

2014-07-20 Thread Dario Strbenac
Hello,

I rediscovered an old bug 
https://bugs.r-project.org/bugzilla/show_bug.cgi?id=12572 It was reported six 
years ago, but hasn't been accepted or rejected. Is there a plan to address it 
soon ?

> sessionInfo()
R version 3.1.1 (2014-07-10)
Platform: x86_64-unknown-linux-gnu (64-bit)

--
Dario Strbenac
PhD Student
University of Sydney
Camperdown NSW 2050
Australia
__
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel