Skip to content

Commit da27231

Browse files
committed
try R 4.5.0 Windows
1 parent 906f46e commit da27231

File tree

3 files changed

+24
-37
lines changed

3 files changed

+24
-37
lines changed

cran-comments.md

Lines changed: 3 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22

33
0 errors | 0 warnings | 1 note
44

5-
* This is a corrected release (5.3.3)
6-
* Changes:
7-
* 'configure' tests that the installed Tesseract version is compatible
8-
with the C++ compiler (requested by Prof. Brian Ripley, CRAN).
9-
* Adds Tesseract as a MacOS requirement (via brew) and does not use autobrew
10-
to install it - requested by CRAN on an email.
11-
* Uses 'pdftools' conditionally. Btw, I cannot get to install pdftools
12-
on the Niagara cluster, meaning that it is that package that has an issue
13-
with clang 19.
14-
* The notes for r-release-macos-arm64 - r-oldrel-windows-x86_64 were fixed
15-
by moving as much as possible to system packages that can be installed with
16-
'apt-get' or similar.
17-
* CRAN shows this for 5.3.2 on r-devel-linux-x86_64-debian-gcc , I think
18-
I don't have a way to change your server
19-
permissions from my side:
20-
"installing to library
21-
‘/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages’
22-
Error: ERROR: no permission to install to directory
23-
‘/home/hornik/tmp/R.check/r-devel-gcc/Work/build/Packages’"
24-
* The warnings with clang19 (and clang-asan) were solved by sending a pull
25-
request to Posit (https://github.com/r-lib/cpp11/pull/404/files). This
26-
fix required to patch a package used by cpp11tesseract and add a conditional
27-
to avoid redeclaring STRICT_R_HEADERS.
5+
* C++11 specification is essential as the tesseract library requires C++11
6+
features.
7+
* V5.3.6 fixes all CRAN warnings and errors.

src/Makevars.win

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
11
# Tesseract configuration
2-
32
RWINLIB = ../windows/tesseract
43
PKG_CPPFLAGS = -I${RWINLIB}/include -I${RWINLIB}/include/leptonica -fvisibility=hidden
54

6-
# Exclude unwanted symbols from DLL
5+
# Exclude unwanted symbols from DLL using more aggressive approach
76
PKG_LIBS = -L${RWINLIB}/lib${subst gcc,,${COMPILED_BY}}${R_ARCH} \
87
-L${RWINLIB}/lib \
8+
-Wl,--whole-archive \
99
-ltesseract -lleptonica \
10+
-Wl,--no-whole-archive \
1011
-ltiff -lopenjp2 -lwebp -lsharpyuv -ljpeg -lgif -lpng16 -lz \
1112
-lws2_32 \
12-
-Wl,--exclude-all-symbols
13+
-Wl,--exclude-all-symbols \
14+
-static-libgcc -static-libstdc++
1315

14-
# CRAN note: consistent C++11 standard usage
15-
CXX_STD = CXX11
16+
# For R 4.5.0 compatibility
17+
ifeq ($(shell ${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e 'cat(as.numeric(R.version$$major) + as.numeric(R.version$$minor)/10)'),4.5)
18+
PKG_LIBS += -Wl,--version-script=../tools/exports.map
19+
endif
1620

1721
# Compile
18-
all: clean winlibs
22+
all: clean winlibs exports.map
1923

2024
clean:
21-
rm -Rf $(OBJECTS) $(SHLIB)
25+
rm -Rf $(OBJECTS) $(SHLIB) exports.map cpp11tesseract.def
26+
27+
exports.map: clean
28+
@echo "{ global: R_init_cpp11tesseract; local: *; };" > ../tools/exports.map
2229

2330
winlibs:
2431
mkdir -p ../inst
2532
"${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe" "../tools/winlibs.R" ${VERSION}
2633
cp -Rf ../windows/tessdata ../inst/
2734
cp -Rf ${RWINLIB}/share/tessdata ../inst/
2835

29-
# Create DEF file to control exports
30-
$(SHLIB): $(OBJECTS) cpp11tesseract.def
31-
32-
cpp11tesseract.def:
33-
echo EXPORTS > cpp11tesseract.def
34-
${DLLTOOL} --input-def cpp11tesseract.def --kill-at --output-lib cpp11tesseract.a $(OBJECTS)
36+
$(SHLIB): $(OBJECTS)
3537

3638
.PHONY: all winlibs clean
37-

tools/export.map

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
global:
3+
R_init_cpp11tesseract;
4+
local:
5+
*;
6+
};

0 commit comments

Comments
 (0)