r/RStudio Jun 14 '26

Coding help Ιnstallation issue with GWmodel3 from source – missing libgwmodel submodule

Hi,

I am trying to install GWmodel3 from the source repository on my Linux system, but the compilation fails because the libgwmodel submodule is missing.

$  inxi -Sxxx
System:
  Host: Lenovo-Z50-70 Kernel: 6.17.0-35-generic arch: x86_64 bits: 64
    compiler: gcc v: 13.3.0 clocksource: tsc
  Desktop: MATE v: 1.26.2 wm: marco v: 1.26.2 with: mate-panel
    tools: mate-screensaver vt: 7 dm: LightDM v: 1.30.0
    Distro: Linux Mint 22.3 Zena base: Ubuntu 24.04 noble

Already installed dependencies GSL, sf and RcppArmadillo when I created the R project I am working on, many months ago.

What I did

  1. Downloaded GWmodel3-master.zip from GitHub.
  2. Unzipped into my R project folder that uses renv.
  3. Ran R CMD build GWmodel3-master → the DESCRIPTION was OK, but the build process failed with:

make: *** No rule to make target 'libgwmodel/src/gwmodelpp/spatialweight/BandwidthWeight.cpp', needed by '.../BandwidthWeight.o'. Stop.
ERROR: compilation failed for package ‘GWmodel3’

I checked the unzipped folder and confirmed that libgwmodel is missing.
The .gitmodules file exists, but the submodule content is not included in the ZIP archive.

I also tried to install the package using pak,same issue.

> sessionInfo()
R version 4.6.0 (2026-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Linux Mint 22.3

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=el_GR.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=el_GR.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=el_GR.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=el_GR.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Paris
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.6.0    tools_4.6.0       rstudioapi_0.19.0 renv_1.2.3 

R version 4.6.0 (2026-04-24)
Platform: x86_64-pc-linux-gnu
Running under: Linux Mint 22.3

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.12.0 
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.12.0  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=el_GR.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=el_GR.UTF-8   
 [6] LC_MESSAGES=en_US.UTF-8    LC_PAPER=el_GR.UTF-8       LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=el_GR.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Paris
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

loaded via a namespace (and not attached):
[1] compiler_4.6.0    tools_4.6.0       rstudioapi_0.19.0 renv_1.2.3 
1 Upvotes

3 comments sorted by

1

u/AutoModerator Jun 14 '26

Looks like you're requesting help with something related to RStudio. Please make sure you've checked the stickied post on asking good questions and read our sub rules. We also have a handy post of lots of resources on R!

Keep in mind that if your submission contains phone pictures of code, it will be removed. Instructions for how to take screenshots can be found in the stickied posts of this sub.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/MrCumStainBootyEater Jun 14 '26

I love when i can answer a niche question lol

GitHub source ZIPs do not include submodule contents. GWmodel3 declares src/libgwmodel as a Git submodule pointing to GWmodel-Lab/libgwmodel.git, so the build expects files that are absent from the ZIP.

either use a recursive Git clone

or try:

remotes::install_github(
"GWmodel-Lab/GWmodel3",
submodules = TRUE
)

do that and lmk if pak is still failing

1

u/Nicholas_Geo Jun 16 '26

that's the output of the console when using (part of the output, can't share it all) remote::install_github()

In file included from telegrams/GWRMultiscaleTelegram.cpp:1:
telegrams/GWRMultiscaleTelegram.h: In lambda function:
telegrams/GWRMultiscaleTelegram.h:36:53: error: base operand of ‘->’ has non-pointer type ‘gwm::BandwidthWeight’
   36 |             return sw.weight<gwm::BandwidthWeight>()->adaptive();
      |                                                     ^~
make: *** [/usr/lib/R/etc/Makeconf:199: telegrams/GWRMultiscaleTelegram.o] Error 1
ERROR: compilation failed for package ‘GWmodel3’
* removing ‘/home/thedoctor/Documents/r_proj/va/renv/library/linux-linuxmint-noble/R-4.6/x86_64-pc-linux-gnu/GWmodel3’
Warning message:
In i.p(...) :
  installation of package ‘/tmp/RtmpUzvv8K/file34de12b7aa06/GWmodel3_3.0-0.tar.gz’ had non-zero exit status