resplab / epicR

R package for the Evaluation Platform in COPD (EPIC), an agent-based whole-disease model for projection of health and economic outcomes and COPD interventions.
11 stars 11 forks source link

install_github with --no-multiarch argument #4

Closed aminadibi closed 7 years ago

aminadibi commented 7 years ago

i386 architecture must be excluded in Windows, otherwise it causes the following error

however, it is unclear how this can be done. The question has been asked in stackoverflow and remains unanswered.

** testing if installed package can be loaded
*** arch - i386
Error in inDL(x, as.logical(local), as.logical(now), ...) : 
  unable to load shared object 'C:/Users/maadibi/Documents/R/win-library/3.3/epicR/libs/i386/epicR.dll':
  LoadLibrary failure:  %1 is not a valid Win32 application.

Error: loading failed
Execution halted
*** arch - x64
ERROR: loading failed for 'i386'

Mac OS doesn't show the same issue.

aminadibi commented 7 years ago

This has been posted on Stackoverflow:

The only way that I found working for me is setting the options:

library(devtools) options(devtools.install.args = "--no-multiarch")
install_github("ramnathv/rCharts")

aminadibi commented 7 years ago

That's it! On Windows, one needs to do this: library(devtools) options(devtools.install.args = "--no-multiarch") install_github('aminadibi/epicR')

aminadibi commented 7 years ago

The problem was that build files in /src were being pushed to github. Adding the following as .gitignore to /src solved the problem:


# Created by https://www.gitignore.io/api/c

### C ###
# Prerequisites
*.d

# Object files
*.o
*.ko
*.obj
*.elf

# Linker output
*.ilk
*.map
*.exp

# Precompiled Headers
*.gch
*.pch

# Libraries
*.lib
*.a
*.la
*.lo

# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib

# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex

# Debug files
*.dSYM/
*.su
*.idb
*.pdb

# Kernel Module Compile Results
*.mod*
*.cmd
modules.order
Module.symvers
Mkfile.old
dkms.conf

# End of https://www.gitignore.io/api/c