Description: Drop stale native-symbol references from regsem_init.c
 regsem_init.c is a leftover of an older Rcpp-generated package
 initialization.  It referenced the native symbols
 (regsem_rcpp_fit_fun, regsem_rcpp_grad_ram, regsem_rcpp_quasi_calc,
 regsem_rcpp_RAMmult) which no longer exist: the current
 RcppExports.cpp defines R_init_regsem() and registers the '_regsem_*'
 wrapper symbols instead.  The stale extern references made regsem.so
 contain undefined symbols (e.g. 'regsem_rcpp_fit_fun'), so loading the
 package failed with 'undefined symbol' at install time.  Remove the
 dead references; dynamic registration is fully handled by
 RcppExports.cpp.
Author: tangxiaofeng <tangxiaofeng@kylinos.cn>
Origin: other
Forwarded: not-needed
Last-Update: 2026-09-05

--- r-cran-regsem-1.9.5+dfsg.orig/src/regsem_init.c
+++ r-cran-regsem-1.9.5+dfsg/src/regsem_init.c
@@ -3,26 +3,19 @@
 #include <stdlib.h> // for NULL
 #include <R_ext/Rdynload.h>
 
-/* FIXME:
-   Check these declarations against the C/Fortran source code.
-*/
-
-/* .Call calls */
-extern SEXP regsem_rcpp_fit_fun(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP regsem_rcpp_grad_ram(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-extern SEXP regsem_rcpp_quasi_calc(SEXP, SEXP, SEXP, SEXP);
-extern SEXP regsem_rcpp_RAMmult(SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP, SEXP);
-
-static const R_CallMethodDef CallEntries[] = {
-    {"regsem_rcpp_fit_fun",    (DL_FUNC) &regsem_rcpp_fit_fun,     8},
-    {"regsem_rcpp_grad_ram",   (DL_FUNC) &regsem_rcpp_grad_ram,   12},
-    {"regsem_rcpp_quasi_calc", (DL_FUNC) &regsem_rcpp_quasi_calc,  4},
-    {"regsem_rcpp_RAMmult",    (DL_FUNC) &regsem_rcpp_RAMmult,     9},
-    {NULL, NULL, 0}
-};
-
-//void R_init_regsem(DllInfo *dll)
-//{
-//  R_registerRoutines(dll, NULL, CallEntries, NULL, NULL);
-//  R_useDynamicSymbols(dll, FALSE);
-//}
+/*
+ * This file used to be the package initialization generated by an older
+ * version of Rcpp.  It referenced the native symbols
+ * (regsem_rcpp_fit_fun, regsem_rcpp_grad_ram, regsem_rcpp_quasi_calc,
+ * regsem_rcpp_RAMmult) which no longer exist in the code base: the
+ * current src/RcppExports.cpp (regenerated with a newer Rcpp) defines
+ * R_init_regsem() and registers the '_regsem_*' wrapper symbols, and the
+ * R side (R/RcppExports.R) calls .Call('_regsem_*', ...).
+ *
+ * Keeping the stale extern references and the old CallEntries table made
+ * regsem.so contain undefined symbols (e.g. 'regsem_rcpp_fit_fun'), so
+ * loading the package failed with 'undefined symbol' at install time.
+ *
+ * The whole dynamic registration duty is now handled by RcppExports.cpp;
+ * there is nothing left for this translation unit to do.
+ */
