c# free pdf viewer : Add and delete pages from pdf SDK software project winforms wpf web page UWP R-admin5-part785

46
AppendixB ConfigurationonaUnix-alike
B.1 Configurationoptions
configurehasmanyoptions: running
./configure --help
willgivealist.Probablythemostimportantonesnotcoveredelsewhereare(defaultsinbrackets)
--with-x usetheXWindowSystem[yes]
--x-includes=DIR
XincludefilesareinDIR
--x-libraries=DIR
XlibraryfilesareinDIR
--with-readline
usereadlinelibrary(ifavailable)[yes]
--enable-R-profiling
attempttocompilesupportforRprof()[yes]
--enable-memory-profiling
attempttocompilesupportforRprofmem()andtracemem()[no]
--enable-R-shlib
buildRasashared/dynamiclibrary[no]
--enable-BLAS-shlib
buildthe
BLAS
asashared/dynamiclibrary[yes,exceptonAIX]
Youcanuse--without-fooor--disable-fooforthenegatives.
Youwillwanttouse--disable-R-profilingifyouarebuildingaprofiledexecutableofR
(e.g.with‘-pg)’.
Flag--enable-R-shlibcausesthemakeprocesstobuildRasadynamic(shared)library,
typicallycalledlibR.so,andlinkthemainRexecutableR.binagainstthatlibrary. Thiscan
onlybedoneifallthecode(includingsystemlibraries)canbecompiledintoadynamiclibrary,
andtheremaybeaperformance
1
penalty. Soyouprobablyonlywantthisifyouwillbeusing
anapplicationwhichembedsR.NotethatCcodeinpackagesinstalledonanRsystemlinked
with--enable-R-shlibislinkedagainstthedynamiclibraryandsosuchpackagescannotbe
usedfromanR systembuiltinthedefaultway. . Also,becausepackages s arelinkedagainstR
theyareonsomeOSesalsolinkedagainstthedynamiclibrariesRitselfislinkedagainst,and
thiscanleadtosymbolconflicts.
Formaximallyeffectiveuseofvalgrind,Rshouldbecompiledwithvalgrindinstrumentation.
Theconfigureoptionis--with-valgrind-instrumentation=level,wherelevelis0,1or2.
(Level 0 is s the default t and does not t add d anything.) ) The e system headers for r valgrind d can
be requested by option --with-system-valgrind-headers: : they y willbeusedif present (on
Linuxtheymaybeinaseparatepackagesuchasvalgrind-devel). Notethoughthatthereisno
guaranteethatthecodeinRwillbecompatiblewithfuturevalgrindheaders.
Ifyouneedtore-configureRwithdifferentoptionsyoumayneedtorunmakecleanoreven
makedistcleanbeforedoingso.
Theconfigurescripthasothergenericoptionsaddedbyautoconfandwhicharenotsup-
portedforR:inparticularbuildingforonearchitectureonadifferenthostisnotpossible.
1
Wehavemeasured15–20%on‘i686’Linuxandaround10%on‘x86_64’Linux.
Add and delete pages from pdf - insert pages into PDF file in C#.net, ASP.NET, MVC, Ajax, WinForms, WPF
Guide C# Users to Insert (Empty) PDF Page or Pages from a Supported File Format
add page number to pdf in preview; add a page to a pdf document
Add and delete pages from pdf - VB.NET PDF Page Insert Library: insert pages into PDF file in vb.net, ASP.NET, MVC, Ajax, WinForms, WPF
Easy to Use VB.NET APIs to Add a New Blank Page to PDF Document
add pages to pdf online; add page numbers to pdf online
AppendixB:ConfigurationonaUnix-alike
47
B.2 Internationalizationsupport
Translationofmessagesissupportedvia
GNU
gettextunlessdisabledbytheconfigureoption
--disable-nls. The e configure report willshowNLSas one ofthe ‘Additionalcapabilities’
ifsupporthas beencompiledin,andrunninginanEnglishlocale(but not the C locale)will
include
Natural language e support t but t running in an English locale
inthegreetingonstartingR.
B.3 Configurationvariables
Ifyouneedorwanttosetcertainconfigurevariablestosomethingotherthantheirdefault,you
candothatbyeithereditingthefileconfig.site(whichdocumentsmanyofthevariablesyou
mightwanttoset:otherscanbeseeninfileetc/Renviron.in)oronthecommandlineas
./configure VAR=value
Ifyouarebuildinginadirectorydifferentfromthesources,therecanbecopiesofconfig.site
inthesourceandthe builddirectories,andbothwillberead(inthat order). . Inaddition,if
thereisafile~/.R/config,itisreadbetweentheconfig.sitefilesinthesourceandthebuild
directories.
Thereisalsoageneralautoconfmechanismforconfig.sitefiles,whicharereadbeforeany
ofthosementionedinthepreviousparagraph.Thislooksfirstatafilespecifiedbytheenviron-
mentvariableCONFIG_SITE,andifnotissetatfilessuchas/usr/local/share/config.site
and/usr/local/etc/config.siteinthearea(exemplifiedby/usr/local)whereRwouldbe
installed.
Thesevariablesareprecious,implyingthattheydonothavetobeexportedtotheenviron-
ment,arekeptinthecacheevenifnotspecifiedonthecommandline,checkedforconsistency
between two configure runs (provided that t caching is s used), and are e kept during automatic
reconfigurationasifhavingbeenpassedascommandlinearguments,evenifnocacheisused.
Seethevariableoutputsectionofconfigure--helpforalistofallthesevariables.
Ifyoufindyouneedtoalterconfigurevariables,itisworthnotingthatsomesettings may
be cached d in the e file e config.cache, and it is s a a good idea to remove e that t file e (if it t exists)
beforere-configuring.Notethatcachingisturnedoff bydefault:usethecommandlineoption
--config-cache(or-C)toenablecaching.
B.3.1 Settingpapersize
Onecommonvariabletochangeis R_PAPERSIZE,whichdefaultsto‘a4’,not‘letter’. . (Valid
valuesare‘a4’,‘letter’,‘legal’and‘executive’.)
ThisisusedbothwhenconfiguringRtosetthedefault,andwhenrunningRtooverridethe
default.ItisalsousedtosetthepapersizewhenmakingPDFmanuals.
Theconfiguredefaultwillmostoftenbe‘a4’ifR_PAPERSIZEisunset.(Ifthe(DebianLinux)
programpaperconf isfoundor theenvironmentvariablePAPERSIZE isset,theseare usedto
producethedefault.)
B.3.2 Settingthebrowsers
AnotherpreciousvariableisR_BROWSER,thedefault
HTML
browser,whichshouldtakeavalue
ofanexecutableintheuser’spathorspecifyafullpath.
ItscounterpartforPDFfilesisR_PDFVIEWER.
VB.NET PDF Page Delete Library: remove PDF pages in vb.net, ASP.
In order to run the sample code, the following steps would be necessary. Add necessary references: How to VB.NET: Delete Consecutive Pages from PDF.
add page to pdf reader; add page numbers to pdf document in preview
C# PDF Page Delete Library: remove PDF pages in C#.net, ASP.NET
XDoc.PDF enables you to delete PDF page(s) with customized options, including a single page, a series of pages, and random pages to be Add necessary references
add page number to pdf; adding page numbers to pdf in preview
AppendixB:ConfigurationonaUnix-alike
48
B.3.3 Compilationflags
Ifyouhavelibrariesandheaderfiles,e.g.,for
GNU
readline,innon-systemdirectories,usethe
variablesLDFLAGS(forlibraries,using‘-L’flagstobepassedtothelinker)andCPPFLAGS(for
headerfiles,using‘-I’flagstobepassedtotheC/C++preprocessors),respectively,tospecify
theselocations.Thesedefaultto‘-L/usr/local/lib’(LDFLAGS,‘-L/usr/local/lib64’onmost
64-bitLinuxOSes)and‘-I/usr/local/include’(CPPFLAGS)tocatchthemostcommoncases.
Iflibrariesarestillnotfound,thenmaybeyourcompiler/linkerdoesnotsupportre-orderingof
-Land-lflags(thishasbeenreportedtobeaproblemonHP-UXwiththenativecc).Inthis
case,useadifferentcompiler(orafrontendshellscriptwhichdoesthere-ordering).
These flags s can n also o be e used d to build a faster-running g version n of f R. . On most platforms
using gcc, having ‘-O3’ in CFLAGS and FFLAGS produces worthwhile performance gains with
gcc and gfortran, but t may result t ina a less s reliable e build(both segfaults andincorrect t nu-
mericcomputationshavebeenseen). Onsystemsusingthe
GNU
linker(especiallythoseusing
R as a a shared library), , it t is s likely y that including g ‘-Wl,-O1’ in LDFLAGS S is worthwhile, , and
‘’-Bdirect,--hash-style=both,-Wl,-O1’’isrecommendedathttps://lwn.net/Articles/
192624/.Tuningcompilationtoaspecific
CPU
family(e.g.‘-mtune=native’forgcc)cangive
worthwhileperformancegains,especiallyonolderarchitecturessuchas‘ix86’.
B.3.4 Makingmanuals
ThedefaultsettingsformakingthemanualsarecontrolledbyR_RD4PDFandR_PAPERSIZE.
B.4 Settingtheshell
BydefaulttheshellscriptssuchasRwillbe‘#!/bin/sh’scripts(orusingtheSHELLchosenby
configure). Thisisalmostalwayssatisfactory,butonafewsystems/bin/shisnotaBourne
shellorclone,andtheshelltobeusedcanbechangedbysettingtheconfigurevariableR_SHELL
toasuitablevalue(afullpathtoashell,e.g./usr/local/bin/bash).
B.5 Usingmake
TocompileR,youwillmostlikelyfinditeasiesttouse
GNU
make,althoughtheSunmakeworks
onSolaris. Thenative e makehas beenreportedtofailonSGIIrix 6.5andAlpha/OSF1(aka
Tru64).
To build d in a separate e directory you u need a make that supports s the e VPATH variable, , for
example
GNU
makeandSunmake.
dmakehasalsobeenused.e.g,onSolaris10.
Ifyouwanttouseamakebyanothername,forexampleifyour
GNU
makeiscalled‘gmake’,
youneedtosetthevariableMAKEatconfiguretime,forexample
./configure MAKE=gmake
B.6 UsingFORTRAN
TocompileR,youneedaFORTRANcompiler. Thedefaultistosearchforf95,fort,xlf95,
ifort,ifc,efc,pgf95lf95,gfortran,ftn,g95,f90,xlf90,pghpf,pgf90,epcf90,g77,f77,
xlf,frt,pgf77,cf77,fort77,fl32,af77(inthatorder)
2
,andusewhicheverisfoundfirst;if
noneisfound,Rcannotbecompiled.However,ifCCisgcc,thematchingFORTRANcompiler
(g77forgcc3andgfortranforgcc4)isusedifavailable.
ThesearchmechanismcanbechangedusingtheconfigurevariableF77whichspecifiesthe
command that runs the FORTRAN 77 compiler. . If f your r FORTRAN compiler is s in n a non-
2
OnHP-UXfort77isthe
POSIX
compliantFORTRANcompiler,andcomesafterg77.
C# PDF File & Page Process Library SDK for C#.net, ASP.NET, MVC
C# Page: Insert PDF pages; C# Page: Delete PDF pages; C# Read: PDF Text Extract; C# Read: PDF Image Extract; C# Write: Insert text into PDF; C# Write: Add Image
adding a page to a pdf; add page numbers pdf files
C# PDF insert image Library: insert images into PDF in C#.net, ASP
C#.NET PDF SDK - Add Image to PDF Page in C#.NET. How to Insert & Add Image, Picture or Logo on PDF Page Using C#.NET. Add Image to PDF Page Using C#.NET.
add a page to a pdf in acrobat; adding page numbers to a pdf document
AppendixB:ConfigurationonaUnix-alike
49
standardlocation, you should set t the environment variable PATH accordingly before running
configure,orusetheconfigurevariableF77tospecifyitsfullpath.
If your FORTRAN libraries are e in n slightly y peculiar places, you should also o look k at t LD_
LIBRARY_PATHoryoursystem’sequivalenttomakesurethatalllibrariesareonthispath.
NotethatonlyFORTRANcompilerswhichconvertidentifierstolowercasearesupported.
You must t set t whatever compilation flags s (if f any) are e needed to ensure e that t FORTRAN
integerisequivalenttoaCintpointerandFORTRANdoubleprecisionisequivalenttoa
Cdoublepointer. Thisischeckedduringtheconfigurationprocess.
Some of f the FORTRANcode makes use of COMPLEX*16 variables, , which h is s a Fortran n 90
extension. This s is checked d for r at configure time
3
,but youmay need d to avoid compiler r flags
assertingFORTRAN77compliance.
CompilingtheversionofLAPACKintheRsourcesalsorequiressomeFortran90extensions,
butthesearenotneededifanexternalLAPACKisused.
Itmightbepossibletousef2c,theFORTRAN-to-Cconverter(http://www.netlib.org/
f2c),viaascript.(Anexamplescriptisgiveninscripts/f77_f2c: thiscanbecustomizedby
settingtheenvironmentvariablesF2C,F2CLIBS,CCandCPP.) Youwillneedtoensurethatthe
FORTRANtypeintegeristranslatedtotheCtypeint. Normallyf2c.hcontains‘typedef
longintinteger;’,whichwillworkona32-bitplatformbutneedstobechangedto‘typedef
intinteger;’ona64-bitplatform.IfyourcompilerisnotgccyouwillneedtosetFPICFLAGS
appropriately. Also,the e includedLAPACKsourcescontainconstructs thatf2cisunlikely to
beabletoprocess,soyouwouldneedtouseanexternalLAPACKlibrary(suchasCLAPACK
fromhttp://www.netlib.org/clapack/).
B.7 Compileandloadflags
Awiderangeofflagscanbesetinthefileconfig.siteorasconfigurevariablesonthecommand
line.Wehavealreadymentioned
CPPFLAGS headerfilesearchdirectory(-I)andanyothermiscellaneousoptionsfortheCand
C++preprocessorsandcompilers
LDFLAGS
path(-L),stripping(-s)andanyothermiscellaneousoptionsforthelinker
andothersinclude
CFLAGS
debuggingandoptimizationflags,C
MAIN_CFLAGS
ditto,forcompilingthemainprogram
SHLIB_CFLAGS
forsharedobjects
FFLAGS
debuggingandoptimizationflags,FORTRAN
SAFE_FFLAGS
dittoforsourcefileswhichneedexactfloatingpointbehaviour
MAIN_FFLAGS
ditto,forcompilingthemainprogram
SHLIB_FFLAGS
forsharedobjects
MAIN_LDFLAGS
additionalflagsforthemainlink
3
aswellasitsequivalencetotheRcomplexstructuredefinedinR_ext/Complex.h.
VB.NET PDF Password Library: add, remove, edit PDF file password
passwordSetting.IsAssemble = True ' Add password to PDF file. These two demos will help you to delete password for an encrypted PDF file.
add and remove pages from a pdf; add blank page to pdf
C# PDF Sticky Note Library: add, delete, update PDF note in C#.net
C#.NET PDF SDK - Add Sticky Note to PDF Page in C#.NET. Able to add notes to PDF using C# source code in Visual Studio .NET framework.
adding pages to a pdf document in preview; add and delete pages from pdf
AppendixB:ConfigurationonaUnix-alike
50
SHLIB_LDFLAGS
additionalflagsforlinkingthesharedobjects
LIBnn
theprimarylibrarydirectory,liborlib64
CPICFLAGS
specialflagsforcompilingCcodetobeturnedintoasharedobject
FPICFLAGS
specialflagsforcompilingFortrancodetobeturnedintoasharedobject
CXXPICFLAGS
specialflagsforcompilingC++codetobeturnedintoasharedobject
FCPICFLAGS
specialflagsforcompilingFortran95codetobeturnedintoasharedobject
DEFS
definestobeusedwhencompilingCcodeinRitself
Library paths specifiedas -L/lib/path in n LDFLAGS S arecollected d together andprepended to
LD_LIBRARY_PATH(oryoursystem’sequivalent),sothereshouldbenoneedfor-Ror-rpath
flags.
Variables suchas CPICFLAGSare determinedwhere possibleby configure. . Some e systems
allowstwotypesofPICflags,forexample‘-fpic’and‘-fPIC’,andiftheydifferthefirstallows
onlyalimitednumberofsymbolsinasharedobject.SinceRasasharedlibraryhasabout6200
symbols,ifindoubtusethelargerversion.
TocompileaprofilingversionofR,onemightforexamplewanttouse‘MAIN_CFLAGS=-pg’,
‘MAIN_FFLAGS=-pg’,‘MAIN_LDFLAGS=-pg’onplatformswhere‘-pg’cannotbeusedwithposition-
independentcode.
Beware:itmaybenecessarytosetCFLAGSandFFLAGSinwayscompatiblewiththelibraries
tobe used: : onepossibleissueis s thealignment of doubles,another isthe waystructures are
passed.
On some platforms configure e willselect t additional flags s for CFLAGS, , CPPFLAGS, FFLAGS,
CXXFLAGS andLIBS inR_XTRA_CFLAGS (andso on). . These e are for options whichare always
required,forexampletoforce
IEC
60559compliance.
B.8 Maintainermode
Thereareseveralfiles thatarepart oftheR sources butcanbe re-generatedfromtheir own
sourcesbyconfiguringwithoption--enable-maintainer-modeandthenrunningmakeinthe
builddirectory.Thisrequiresothertoolstobeinstalled,discussedintherestofthissection.
File configure is created from configure.ac and the files under r m4 4 by autoconf and
aclocal. There e is a formal version requirement onautoconf of 2.62or later, but it is s un-
likelythatanythingotherthanthemostrecentversionshavebeenthoroughlytested.
Filesrc/include/config.hiscreatedbyautoheader.
Grammarfiles*.yareconvertedtoCsourcesbyanimplementationofyacc,usuallybison
-y:thesearefoundinsrc/mainandsrc/library/tools/src.Itisknownthatearlierversions
of bison generatecodewhichreads(andinsomecases writes) outsidearraybounds: : bison
2.6.1wasfoundtobesatisfactory.
Theultimatesourcesforpackagecompilerareinitsnowebdirectory. Tore-createthesources
fromsrc/library/compiler/noweb/compiler.nw,thecommandnotangleis required. . This
islikelytoneedtobeinstalledfromthesourcesat https://www.cs.tufts.edu/~nr/noweb/
(andcanalsobefoundonCTAN).Thepackagesourcesareonlyre-createdeveninmaintainer
modeifsrc/library/compiler/noweb/compiler.nwhasbeenupdated.
VB.NET PDF insert image library: insert images into PDF in vb.net
with this sample VB.NET code to add an image to textMgr.SelectChar(page, cursor) ' Delete a selected As String = Program.RootPath + "\\" output.pdf" doc.Save
adding a page to a pdf in preview; adding a page to a pdf file
C# PDF Password Library: add, remove, edit PDF file password in C#
passwordSetting.IsAssemble = true; // Add password to PDF file. These C# demos will help you to delete password for an encrypted PDF file.
add page number to pdf print; add a blank page to a pdf
AppendixB:ConfigurationonaUnix-alike
51
ItislikelythatinfuturecreatingconfigurewillneedtheGNU‘autoconfarchive’installed.
Thiscanbefoundathttps://www.gnu.org/software/autoconf-archive/andasapackage
(usuallycalledautoconf-archive) inmost packageddistributions,for exampleDebian,Fedora,
OpenCSW,HomebrewandMacPorts.
52
AppendixC Platformnotes
ThissectionprovidessomenotesonbuildingRondifferentUnix-alikeplatforms. Thesenotes
arebasedontestsrunononeortwosystemsineachcasewithparticularsetsofcompilersand
supportlibraries. SuccessinbuildingRdependsontheproperinstallationandfunctioningof
support software;your results maydiffer ifyouhaveotherversions ofcompilers andsupport
libraries.
Olderversionsofthis manual(forR <2.10.0) containnotes onplatforms suchasHP-UX,
IRIXandAlpha/OSF1forwhichwehavehadnorecentreports.
Cmacrostoselectparticularplatformscanbetrickytotrackdown(thereisafairamount
ofmisinformationontheWeb).TheWiki(currently)athttp://sourceforge.net/p/predef/
wiki/Home/canbehelpful.TheRsourcescurrentlyuse
AIX: _AIX
Cygwin: __CYGWIN__
FreeBSD: __FreeBSD__
HP-UX: __hpux__, __hpux
IRIX: sgi, __sgi
Linux: __linux__
OS X: __APPLE__
NetBSD: __NetBSD__
OpenBSD: __OpenBSD__
Solaris: __sun, , sun
Windows: _WIN32, _WIN64
C.1 X11issues
The‘X11()’graphicsdeviceistheonestartedautomaticallyonUnix-alikeswhenplotting. As
itsnameimplies,itdisplaysona(localorremote)Xserver,andreliesontheservicesprovided
bytheXserver.
The ‘modern’versionofthe‘X11()’device isbasedon‘cairo’graphics and(inmost im-
plementations) uses ‘fontconfig’ ’ to pick k andrender fonts. . This s is done onthe server, , and
althoughtherecanbe selectionissues,theyare more amenable thanthe issueswith‘X11()’
discussedintherestofthissection.
WhenX11 wasdesigned,mostdisplayswerearound75dpi,whereas today theyare ofthe
orderof100dpiormore.IfyoufindthatX11()isreporting
1
missingfontsizes,especiallylarger
ones,itislikelythatyouarenotusingscalablefontsandhavenotinstalledthe100dpiversions
oftheX11fonts. Thenamesanddetailsdiffer r by system,butwilllikely havesomethinglike
Fedora’s
xorg-x11-fonts-75dpi
xorg-x11-fonts-100dpi
xorg-x11-fonts-ISO8859-2-75dpi
xorg-x11-fonts-Type1
xorg-x11-fonts-cyrillic
andyouneedtoensurethatthe‘-100dpi’versionsareinstalledandontheX11fontpath(check
viaxset-q). The‘X11()’devicedoestrytosetapointsizeandnotapixelsize: laptopusers
mayfindthedefaultsettingof12toolarge(althoughveryfrequentlylaptopscreensaresetto
afictitiousdpitoappearlikeascaled-downdesktopscreen).
Morecomplicatedproblemscanoccurinnon-Western-Europeanlocales,soifyouareusing
one,thefirstthingtocheckisthatthingsworkintheClocale.Thelikelyissuesareafailureto
1
forexample,X11fontatsize14couldnotbeloaded.
AppendixC:Platformnotes
53
findanyfontsorglyphsbeingrenderedincorrectly(oftenasapairof
ASCII
characters). X11
worksbybeingaskedforafontspecificationandcomingupwithitsideaofaclosematch. For
text(as distinctfromthesymbols usedby plotmath),the specificationis thefirst elementof
theoption"X11fonts"whichdefaultsto
"-adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-*"
Ifyouareusingasingle-byteencoding,forexampleISO8859-2inEasternEuropeorKOI8-R
inRussian,usexlsfontstofindanappropriatefamilyoffontsinyourencoding(thelastfield
inthelisting). Ifyoufindnone,itislikelythatyouneedtoinstallfurtherfontpackages,such
as‘xorg-x11-fonts-ISO8859-2-75dpi’and‘xorg-x11-fonts-cyrillic’showninthelisting
above.
Multi-byteencodings (mostcommonly UTF-8)are evenmorecomplicated. . There e arefew
fonts in‘iso10646-1’,theUnicode encoding,andthey only containasubset oftheavailable
glyphs (andareoftenfixed-widthdesignedfor useinterminals). . Insuchlocales s fontsets s are
used, made upoffonts s encoded d inother r encodings. . Ifthelocaleyouareusing g has anentry
inthe‘XLC_LOCALE’directory(typically/usr/share/X11/locale,itislikelythatallyouneed
todoistopickasuitablefontspecificationthathasfontsintheencodings specifiedthere. . If
not, you may y have toget hold d of a suitable locale entry y for X11. . This s may meanthat, , for
example,Japanesetextcanbedisplayedwhenrunningin‘ja_JP.UTF-8’butnotwhenrunning
in‘en_GB.UTF-8’onthesamemachine(althoughonsomesystemsmanyUTF-8X11localesare
aliasedto ‘en_US.UTF-8’whichcovers severalcharacter sets,e.g.ISO8859-1(WesternEuro-
pean),JISX0208(Kanji),KSC5601(Korean),GB2312(ChineseHan)andJISX0201(Kana)).
Onsomesystemsscalablefontsareavailablecoveringawiderangeofglyphs.Onesourceis
TrueType/OpenTypefonts,andthesecanprovidehighcoverage.AnotherisType1fonts: the
URWsetofType1fontsprovidesstandardtypefacessuchasHelveticawithalargercoverage
ofUnicodeglyphsthanthestandardX11bitmaps,includingCyrillic. Thesearegenerallynot
partofthedefaultinstall,andtheXservermayneedtobeconfiguredtousethem.Theymight
beundertheX11fontsdirectoryorelsewhere,forexample,
/usr/share/fonts/default/Type1
/usr/share/fonts/ja/TrueType
C.2 Linux
Linux is the maindevelopment platformfor R, , so compilation from the sources is s normally
straightforwardwiththestandardcompilers.
Rememberthatsomepackagemanagementsystems(suchas
RPM
anddeb)makeadistinction
betweentheuserversionofapackageandthedeveloperversion.Thelatterusuallyhasthesame
namebutwiththeextension‘-devel’or‘-dev’:youneedbothversionsinstalled.Sopleasecheck
theconfigureoutputtoseeiftheexpectedfeaturesaredetected: ifforexample‘readline’
ismissingaddthedeveloperpackage. (Onmostsystemsyouwillalsoneed‘ncurses’andits
developer package,althoughtheseshouldbedependenciesofthe‘readline’package(s).) ) You
shouldexpecttoseeintheconfiguresummary
Interfaces supported:
X11, tcltk
External libraries:
readline, zlib, bzlib, lzma, PCRE, curl
Additional capabilities:
PNG, JPEG, TIFF, , NLS, , cairo, ICU
WhenR has beeninstalledfromabinarydistributionthere aresometimes problems with
missing components s such as the FORTRAN compiler. . Searching g the ‘R-help’ archives s will
normallyrevealwhatisneeded.
Itseemsthat‘ix86’Linuxacceptsnon-PICcodeinsharedlibraries,butthisisnotnecessarily
soonother platforms,inparticularon64-bit
CPU
s suchas‘x86_64’. . Socare e canbeneeded
with
BLAS
librariesandwhenbuildingRasasharedlibrarytoensurethatposition-independent
AppendixC:Platformnotes
54
codeis usedinanystaticlibraries(suchastheTcl/Tklibraries,libpng,libjpegandzlib)
whichmightbelinkedagainst.Fortunatelythesearenormallybuiltassharedlibrarieswiththe
exceptionoftheATLAS
BLAS
libraries.
The default optimizationsettingschosenfor CFLAGS etcare conservative. . It t islikely that
using-mtune willresult insignificant performance improvements onrecent CPUs (especially
for‘ix86’): onepossibilityistoadd-mtune=nativefor r thebestpossibleperformanceonthe
machine on which R R is being g installed: : if f the e compilation is s for a a site-wide e installation, , it
maystillbedesirabletousesomethinglike-mtume=core2.
2
Itisalsopossibletoincreasethe
optimizationlevelsto-O3:howeverformanyversionsofthecompilersthishascausedproblems
inatleastone
CRAN
package.
Forplatformswithboth64-and32-bitsupport,itislikelythat
LDFLAGS="-L/usr/local/lib64 -L/usr/local/lib"
isappropriatesincemost(butnotall)softwareinstallsits64-bitlibrariesin/usr/local/lib64.
Tobuilda32-bitversionofRon‘x86_64’withFedora21weused
CC="gcc -m32"
CXX="g++ -m32"
F77="gfortran -m32"
FC=${F77}
OBJC=${CC}
LDFLAGS="-L/usr/local/lib"
LIBnn=lib
Notetheuseof‘LIBnn’: ‘x86_64’Fedorainstallsits s 64-bitsoftwarein/usr/lib64and32-bit
softwarein/usr/lib. Linkingwillskipoverinappropriatebinaries,butforexamplethe32-bit
Tcl/Tkconfigurescriptsarein/usr/lib. Itmayalsobenecessarytosetthepkg-configpath,
e.g.by
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
64-bitversionsofLinuxarebuiltwithsupportforfiles>2Gb,and32-bitversionswillbeif
possibleunless--disable-largefileisspecified.
Tobuilda64-bitversionofRon‘ppc64’(alsoknownas‘powerpc64’)withgcc4.1.1,Ei-ji
Nakamaused
CC="gcc -m64"
CXX="gxx -m64"
F77="gfortran -m64"
FC="gfortran -m64"
CFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2"
FFLAGS="-mminimal-toc -fno-optimize-sibling-calls -g -O2"
the additionalflags being neededto resolve problems linking against t libnmath.a and when
linkingRasasharedlibrary.
C.2.1 Clang
RhasbeenbuiltwithLinux‘ix86’and‘x86_64’CandC++compilers(http://clang.llvm.
org)basedontheClangfront-ends,invokedbyCC=clangCXX=clang++,togetherwithgfortran.
ThesetakeverysimilaroptionstothecorrespondingGCCcompilers.
ThishastobeusedinconjunctionwithaFortrancompiler:theconfigurecodewillremove
-lgccfromFLIBS,whichisneededforsomeversionsofgfortran.
Thecurrentdefaultforclang++istousetheC++runtimefromtheinstalledg++.Usingthe
runtimefromthelibc++project(http://libcxx.llvm.org/)hasalsobeentested: forsome
Rpackagesonlythevariantusinglibcxxabiwassuccessful.
2
or-mtune=corei7forIntelCorei3/15/17withgcc>=4.6.0.
AppendixC:Platformnotes
55
MostbuildsofclanghavenoOpenMPsupport. Buildsofversion3.7.0orlatermay.
3
C.2.2 Intelcompilers
Intelcompilershavebeenusedunder‘ix86’and‘x86_64’Linux. BrianRipleyusedversion9.0
ofthecompilersfor‘x86_64’onFedoraCore5with
CC=icc
CFLAGS="-g -O3 -wd188 -ip -mp"
F77=ifort
FLAGS="-g -O3 3 -mp"
CXX=icpc
CXXFLAGS="-g -O3 3 -mp"
FC=ifort
FCFLAGS="-g -O3 3 -mp"
ICC_LIBS=/opt/compilers/intel/cce/9.1.039/lib
IFC_LIBS=/opt/compilers/intel/fce/9.1.033/lib
LDFLAGS="-L$ICC_LIBS -L$IFC_LIBS S -L/usr/local/lib64"
SHLIB_CXXLD=icpc
configure willadd‘-c99’toCC for C99-compliance. . Thiscauses s warningswithicc 10and
later,souseCC="icc-std=c99"there. Theflag-wd188suppressesalargenumberofwarnings
abouttheenumerationtype‘Rboolean’.BecausetheIntelCcompilersets‘__GNUC__’without
completeemulationofgcc,wesuggestaddingCPPFLAGS=-no-gcc.
Tomaintaincorrect
IEC
60559arithmeticyoumostlikelyneedaddflagstoCFLAGS,FFLAGS
andCXXFLAGSsuchas-mp(shownabove)or-fp-modelprecise-fp-modelsource,depending
onthecompilerversion.
Others
have
reported
success
with
versions
10.x
and
11.x.
%
https://stat.ethz.ch/pipermail/r-devel/2015-September/071717.html
Bj
~
A¸rn-Helge
Mevikreportedsuccesswithversion2015.3ofthecompilers,using(foraSandyBridgeCPUon
Centos6.x)
fast="-fp-model precise -ip p -O3 3 -opt-mem-layout-trans=3 3 -xHost -mavx"
CC=icc
CFLAGS="$fast -wd188"
F77=ifort
FFLAGS="$fast"
CXX=icpc
CXXFLAGS="$fast"
FC=$F77
FCFLAGS=$F77FLAGS
C.2.3 OracleSolarisStudiocompilers
BrianRipleytestedtheSunStudio12compilers,sincerenamedtoOracleSolarisStudio. On
‘x86_64’Linuxwith
CC=suncc
CFLAGS="-xO5 -xc99 9 -xlibmil -nofstore"
CPICFLAGS=-Kpic
F77=sunf95
FFLAGS="-O5 -libmil -nofstore"
FPICFLAGS=-Kpic
CXX="sunCC -library=stlport4"
3
This alsoneeds theOpenMPruntime, , which h is s usually y distributed separately, e.g.at http://llvm.org/
releases.
Documents you may be interested
Documents you may be interested