Figured out my problem, and so I can add to the list of potential causes of the "failed to compile shared library" error:
4. Use of `inprod` on objects with matrices with only one column.
Not sure if I am describing 4 in the most general manner, but in my case I had in my model:
log(a[s, j]) <- zeta0[s] + inprod(zetaVec[s, 1:n.Xpp], X.pp[j, 1:n.Xpp])
for which n.Xpp = 1. My fix is:
if(n.Xpp > 1) {
log(a[s, j]) <- zeta0[s] + inprod(zetaVec[s, 1:n.Xpp], X.pp[j, 1:n.Xpp])
}
if(n.Xpp == 1) {
log(a[s, j]) <- zeta0[s] + zetaVec[s, 1] * X.pp[j, 1]
}