Please note, the official FVS repository has recently migrated from Source Forge to GitHub. Please visit us at https://github.com/USDAForestService/ForestVegetationSimulator for the latest in code and wiki updates. This Source Forge repository will no longer be maintained, and is kept here as archival reference only.
Rtools provides a single set of tools that includes everything you need to build FVS on Windows. This document describes the process of setting things up so you can use the Rtools toolkit to build FVS executables from the source files in the open-fvs repository. Furthermore this set of tools is used to develop and test the rFVS interface. For more information on the build process, including information for other compiler tools please refer to the other build process wikis or the FAQ wiki.
You will need the appropriate permissions (e.g., Administrator privileges in Windows) to install the necessary tools, so ensure you have that before proceeding.
There are several different compiler packages that can be used to build the executables. The Rtools toolkit package will be discussed here. Refer to the appropriate wiki document for discussion of the others. Download the Rtools toolkit from http://cran.r-project.org/bin/windows/Rtools/. You will want to download the latest Rtools package, or if you are an R user, get the version that corresponds to your version of R.
Once you get the installer downloaded, run it. Include all Components and any Additional Tasks (check boxes to Edit system Path and Save version info to registry). Then just click through the rest of the installation. Unfortunately, when the installation is complete you may not see a program icon like those typically added with an installation.
NOTE: starting with Rtools version 4.0 (and later, as of this writing) users will need to manually specify the PATH location of the directory where the C-language and Fortran compilers are located. This no longer automatically happens during installation. As an example of how to do this in Windows 10:
To test for successful installation of RTools you will need to open a Command Window. For example, on Windows this is done by clicking Start > (All) Programs > Accessories > Command Prompt.
FVS requires C-language and Fortran compilers. If you have correctly installed Rtools, everything you need will be ready for you to use. To test that you have the compilers installed, you can enter these commands from the command prompt.
At the prompt, enter the command
gcc --version
The report resulting from this command should be similar to that shown below.
gcc (Built by Jeroen for the R-project) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Make sure the version shown on the first line of the report is at least 8.3.0
At the prompt, enter the command
gfortran --version
The report resulting from this command should be similar to that shown below.
GNU Fortran (Built by Jeroen for the R-project) 8.3.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Make sure the version shown on the first line of the report is at least 8.3.0
That's it. You’ve successfully installed Rtools and can now build open-fvs programs. Now that you have verified you have successfully installed RTools, the next step is to check out the source code from the Subversion repository located on sourceforge servers.
The open-fvs files are stored in a Subversion (SVN) repository. You will need SVN client software to download the files. Refer to the DownloadingSourceCode wiki document for detailed downloading instructions.
Open a Command Window. If you don't know how to do this, refer to the "Getting the Necessary Tools" section above.
Use the cd
command to navigate to the trunk/bin
directory inside the directory into which you checked out the open-fvs files. If you had placed the files into a directory called MyFvsFiles
you would type the command as shown below. Please note that the Windows operating system requires a backslash (\) instead of a forward slash (/) to separate directory names. Use whatever is appropriate for your operating system.
On Windows:
cd \MyFvsFiles\trunk\bin
On other operating systems:
cd /MyFvsFiles/trunk/bin
The FVS programs are designed to directly read input database tables of the SQlite3 type. They are built in the 64-bit architecture.
Once you have navigated to the correct directory you are ready to make an executable. The FVS variant executables are named FVS__
, where the __
is the 2-letter abbreviation for the variant (e.g., ie
for Inland Empire or ls
for Lake States) . Executables on Windows have the filename extension .exe
added to the base name. To make an executable, type the command make FVS__
(or make FVS__.exe
) with __
replaced by the variant designation. For example, to build the Inland Empire variant you would use the appropriate command shown below.
On Windows:
make FVSie.exe
On other operating systems:
make FVSie
To build the Lake States variant you would use the same command with "ie" replaced with "ls", as shown below.
On Windows:
make FVSls.exe
On other operating systems:
make FVSls
The variant executable file and the shared library with the same name (e.g., FVSls.dll on Windows) are both created created in the trunk/bin
directory in which you are currently working.
A sourcelist file needs to exist in the trunk/bin
directory in order to build the variants in this way. For example, the file FVSls_sourceList.txt
allows you to use the make
command to build the variant executable FVSls
(FVSls.exe
on Windows). Look in the trunk/bin
directory to see which variants are currently available.
To build all of the variants for which a sourcelist file exists just type make
and do not specify a variant. This could take a long time (up to half an hour or more) to complete.
make
To remove all the programs, object files, and build directories, use the "clean" option.
make clean
If the make command does not work, you may have an issue with automatic recognition of the path to the "make" executable. That path may need to be appropriately registered (see step #10 in the above NOTE). An alternative is to supply the full path to the "make" executable in the command above.
Wiki: BuildProcess_UnixAlike
Wiki: DownloadingSourceCode
Wiki: FAQ
Wiki: Testing
Wiki: rFVS
Hey Mike,
Thank you for this wiki info. I have been needing to get SQLite tools into the system path and your instructions did the trick. I thought this would require admin priv and did not want to call CHD. Now, Windows search brings it right up instead of having to navigate to the folder with File Explorer.
Winning!
Lance
[Forest Service Shield]
Lance R. David
Sr Systems Analyst
Forest Service Contractor (METI, Inc)
Forest Management Service Center
p: 970-295-5856
ldavid@fs.fed.usldavid@fs.fed.us
2150 Centre Ave, Bldg A
Fort Collins, CO 80526
www.fs.fed.ushttp://www.fs.fed.us/
[USDA Logo]http://usda.gov/[Forest Service Twitter]https://twitter.com/forestservice[USDA Facebook]http://facebook.com/USDA
Caring for the land and serving people
From: Mike Shettles [mailto:mshettles521@users.sourceforge.net]
Sent: Wednesday, August 8, 2018 10:00 AM
To: BuildProcess_Rtools BuildProcess_Rtools@wiki.open-fvs.p.re.sourceforge.net
Subject: [open-fvs:wiki] mshettles521 modified page BuildProcess_Rtools
--- v6
+++ v7
@@ -11,6 +11,17 @@
There are several different compiler packages that can be used to build the executables. The Rtools toolkit package will be discussed here. Refer to the appropriate wiki document for discussion of the others. Download the Rtools toolkit from <http: cran.r-project.org="" bin="" windows="" rtools="">. You will want to download the latest Rtools package, or if you are an R user, get the version that corresponds to your version of R.</http:>
Once you get the installer downloaded, run it. Include all Components and any Additional Tasks (check boxes to Edit system Path and Save version info to registry). Then just click through the rest of the installation. Unfortunately, when the installation is complete you may not see a program icon like those typically added with an installation.
+
+NOTE: starting with Rtools version 3.5 (and later, as of this writing) users will need to manually specify the PATH location of the directory where the C-language and Fortran compilers are located. This no longer automatically happens during installation. As an example of how to do this in Windows 10:
+
To test for successful installation of RTools you will need to open a Command Window. For example, on Windows this is done by clicking Start > (All) Programs > Accessories > Command Prompt.
@@ -45,7 +56,7 @@
Make sure the version shown on the first line of the report is at least 4.5.
-That's it. You’ve successfully installed Rtools and can now build open-fvs programs. Now that you have verified you have successfully installed RTools, the next step is to check out the source code from the Subversion repository located on google.code servers.
+That's it. You’ve successfully installed Rtools and can now build open-fvs programs. Now that you have verified you have successfully installed RTools, the next step is to check out the source code from the Subversion repository located on sourceforge servers.
## Getting The Source Files
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/open-fvs/wiki/BuildProcess_Rtools/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
This electronic message contains information generated by the USDA solely for the intended recipients. Any unauthorized interception of this message or the use or disclosure of the information it contains may violate the law and subject the violator to civil or criminal penalties. If you believe you have received this message in error, please notify the sender and delete the email immediately.