Compilation errors on Ubuntu 22.04
mbojan opened this issue · comments
I'm getting compilation errors:
gcc -I"/usr/share/R/include" -DNDEBUG -I'/home/mbojan/R/library/4.2/ergm/include' -fpic -g -O2 -ffile-prefix-map=/build/r-base-anRV6o/r-base-4.2.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -c discordTNT.c -o discordTNT.o
In file included from /usr/share/R/include/R.h:80,
from /home/mbojan/R/library/4.2/ergm/include/ergm_edgetree_common.do_not_include_directly.h:11,
from /home/mbojan/R/library/4.2/ergm/include/ergm_edgetree.h:13,
from /home/mbojan/R/library/4.2/ergm/include/ergm_MHproposal.h:13,
from discordTNT.c:10:
discordTNT.c: In function ‘Mi_discordBDStratTNT’:
discordTNT.c:219:39: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypes’
219 | sto->BDTDNE = Calloc(sto->static_sto->strat_nmixtypes, HashEL *);
| ^~
/usr/share/R/include/R_ext/RS.h:53:56: note: in definition of macro ‘Calloc’
53 | #define Calloc(n, t) (t *) R_chk_calloc( (R_SIZE_T) (n), sizeof(t) )
| ^
discordTNT.c:220:48: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypes’
220 | sto->discordantEdges = Calloc(sto->static_sto->strat_nmixtypes, HashEL *);
| ^~
/usr/share/R/include/R_ext/RS.h:53:56: note: in definition of macro ‘Calloc’
53 | #define Calloc(n, t) (t *) R_chk_calloc( (R_SIZE_T) (n), sizeof(t) )
| ^
discordTNT.c:221:37: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypes’
221 | for(int i = 0; i < sto->static_sto->strat_nmixtypes; i++) {
| ^~
discordTNT.c: In function ‘Mx_discordBDStratTNT’:
discordTNT.c:236:39: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypes’
236 | for(int i = 0; i < sto->static_sto->strat_nmixtypes; i++) {
| ^~
discordTNT.c: In function ‘MH_discordBDStratTNT’:
discordTNT.c:319:28: error: too few arguments to function ‘BDStratBlocksDyadCountOnToggle’
319 | Dyad proposeddyadstype = BDStratBlocksDyadCountOnToggle(*Mtail, *Mhead, sto->static_sto->blocks, strat_i, sto->static_sto->tailmaxl, sto->static_sto->headmaxl);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from discordTNT.c:20:
/home/mbojan/R/library/4.2/ergm/include/ergm_BDStratBlocks.h:369:20: note: declared here
369 | static inline Dyad BDStratBlocksDyadCountOnToggle(Vertex tail, Vertex head, BDStratBlocks *blocks, int stratmixingtype, int change, int tailcondition, int headcondition) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
discordTNT.c:355:39: error: ‘BDStratTNTStorage’ has no member named ‘current_total_weight’
355 | double prob_weight = sto->static_sto->current_total_weight/sto->static_sto->proposed_total_weight;
| ^~
discordTNT.c:355:77: error: ‘BDStratTNTStorage’ has no member named ‘proposed_total_weight’
355 | double prob_weight = sto->static_sto->current_total_weight/sto->static_sto->proposed_total_weight;
| ^~
discordTNT.c: In function ‘Mu_discordBDStratTNT’:
discordTNT.c:375:23: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypestoupdate’; did you mean ‘nmixtypestoupdate’?
375 | if(sto->static_sto->strat_nmixtypestoupdate > 0) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| nmixtypestoupdate
discordTNT.c:376:20: error: ‘BDStratTNTStorage’ has no member named ‘current_total_weight’
376 | sto->static_sto->current_total_weight = sto->static_sto->proposed_total_weight;
| ^~
discordTNT.c:376:60: error: ‘BDStratTNTStorage’ has no member named ‘proposed_total_weight’
376 | sto->static_sto->current_total_weight = sto->static_sto->proposed_total_weight;
| ^~
discordTNT.c:377:41: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypestoupdate’; did you mean ‘nmixtypestoupdate’?
377 | for(int i = 0; i < sto->static_sto->strat_nmixtypestoupdate; i++) {
| ^~~~~~~~~~~~~~~~~~~~~~~
| nmixtypestoupdate
discordTNT.c:378:35: error: ‘BDStratTNTStorage’ has no member named ‘strat_mixtypestoupdate’; did you mean ‘nmixtypestoupdate’?
378 | WtPopSetWt(sto->static_sto->strat_mixtypestoupdate[i], edgestate ? sto->static_sto->original_weights[sto->static_sto->strat_mixtypestoupdate[i]] : 0, sto->static_sto->wtp);
| ^~~~~~~~~~~~~~~~~~~~~~
| nmixtypestoupdate
discordTNT.c:378:89: error: ‘BDStratTNTStorage’ has no member named ‘original_weights’
378 | WtPopSetWt(sto->static_sto->strat_mixtypestoupdate[i], edgestate ? sto->static_sto->original_weights[sto->static_sto->strat_mixtypestoupdate[i]] : 0, sto->static_sto->wtp);
| ^~
discordTNT.c:378:125: error: ‘BDStratTNTStorage’ has no member named ‘strat_mixtypestoupdate’; did you mean ‘nmixtypestoupdate’?
378 | tWt(sto->static_sto->strat_mixtypestoupdate[i], edgestate ? sto->static_sto->original_weights[sto->static_sto->strat_mixtypestoupdate[i]] : 0, sto->static_sto->wtp);
| ^~~~~~~~~~~~~~~~~~~~~~
| nmixtypestoupdate
discordTNT.c:391:3: warning: implicit declaration of function ‘BDNodeListsToggleIf’; did you mean ‘NodeListToggle’? [-Wimplicit-function-declaration]
391 | BDNodeListsToggleIf(tail, head, sto->static_sto->lists, sto->static_sto->tailmaxl, sto->static_sto->headmaxl);
| ^~~~~~~~~~~~~~~~~~~
| NodeListToggle
discordTNT.c:391:50: error: ‘BDStratTNTStorage’ has no member named ‘lists’
391 | BDNodeListsToggleIf(tail, head, sto->static_sto->lists, sto->static_sto->tailmaxl, sto->static_sto->headmaxl);
| ^~
discordTNT.c: In function ‘Mf_discordBDStratTNT’:
discordTNT.c:432:37: error: ‘BDStratTNTStorage’ has no member named ‘strat_nmixtypes’
432 | for(int i = 0; i < sto->static_sto->strat_nmixtypes; i++) {
| ^~
make: *** [/usr/lib/R/etc/Makeconf:169: discordTNT.o] Error 1
ERROR: compilation failed for package ‘tergm’
Session info
─ Session info ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
setting value
version R version 4.2.2 (2022-10-31)
os Ubuntu 22.04.1 LTS
system x86_64, linux-gnu
ui X11
language en
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Warsaw
date 2022-11-08
pandoc 2.18 @ /usr/bin/pandoc
─ Packages ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date (UTC) lib source
cli 3.4.1 2022-09-23 [1] CRAN (R 4.2.1)
clipboard 0.0-1 2022-06-25 [1] local
colorspace 2.0-3 2022-02-21 [1] CRAN (R 4.2.0)
lifecycle 1.0.3 2022-10-07 [1] CRAN (R 4.2.1)
magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0)
mbtools 0.3-0 2022-06-25 [1] local
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.2.0)
R6 2.5.1 2021-08-19 [1] CRAN (R 4.2.0)
rlang 1.0.6 2022-09-24 [1] CRAN (R 4.2.1)
scales 1.2.1 2022-08-20 [1] CRAN (R 4.2.1)
sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0)
[1] /home/mbojan/R/library/4.2
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library
─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
ergm
4.3 breaks tergm
that was on CRAN thanks to an API change by someone who shall go unnamed. I just released an update to tergm
that fixes it.
Do you mean tergm
4.1.1 or some upcoming release?
Nevermind, I figured it out...