Dear Jacob,
Today I started to update my setup to latest master for all the Osmocom projects and hit a compile error with Osmo-PCU:
root@D6420:~/newer_osmocom/osmo-pcu# make Making all in src make[1]: Entering directory `/root/newer_osmocom/osmo-pcu/src' CXX gprs_debug.lo CXX csn1.lo CXX gsm_rlcmac.lo CXX gprs_bssgp_pcu.lo In file included from /usr/local/include/osmocom/gsm/prim.h:3:0, from /usr/local/include/osmocom/gprs/gprs_bssgp.h:8, from ./gprs_bssgp_pcu.h:32, from gprs_bssgp_pcu.cpp:22: /usr/local/include/osmocom/core/prim.h:23:27: error: uninitialized const 'osmo_prim_op_names' [-fpermissive] const struct value_string osmo_prim_op_names[5]; ^ In file included from /usr/local/include/osmocom/core/msgb.h:24:0, from /usr/local/include/osmocom/gprs/gprs_ns.h:8, from ./gprs_bssgp_pcu.h:31, from gprs_bssgp_pcu.cpp:22: /usr/local/include/osmocom/core/utils.h:22:8: note: 'const struct value_string' has no user-provided default constructor struct value_string { ^ /usr/local/include/osmocom/core/utils.h:23:15: note: and the implicitly-defined constructor does not initialize 'unsigned int value_string::value' unsigned int value; /*!< \brief numeric value */ ^ make[1]: *** [gprs_bssgp_pcu.lo] Error 1 make[1]: Leaving directory `/root/newer_osmocom/osmo-pcu/src' make: *** [all-recursive] Error 1
I can see that you moving some parts from openbsc to the core library, probably that process is not yet finsihed (or merged to master) and that is causing this problem.
Just wanted to give some feedback and notify the list about this.
Regards, Csaba
Hi Sipos,
On Fri, Dec 25, 2015 at 03:50:45PM +0100, Sipos Csaba wrote:
/usr/local/include/osmocom/core/prim.h:23:27: error: uninitialized const 'osmo_prim_op_names' [-fpermissive] const struct value_string osmo_prim_op_names[5];
This was introduced by one of my recent libosmocore changes, sorry.
The patch below (just pushed to libosmocore master) should fix it.
From c959afdcd9d8f227f4a72a915ac2e3f79d1d1d3b Mon Sep 17 00:00:00 2001
From: Harald Welte laforge@gnumonks.org Date: Fri, 25 Dec 2015 17:14:07 +0100 Subject: [PATCH] osmo_prim_op_names should be extern
--- include/osmocom/core/prim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h index e920eb8..9e71007 100644 --- a/include/osmocom/core/prim.h +++ b/include/osmocom/core/prim.h @@ -20,7 +20,7 @@ enum osmo_prim_operation { PRIM_OP_CONFIRM, /*!< \brief cofirm */ };
-const struct value_string osmo_prim_op_names[5]; +extern const struct value_string osmo_prim_op_names[5];
#define _SAP_GSM_SHIFT 24
Thx Harald, will test it and report back.
Regards, Csaba
----- Eredeti üzenet ----- Feladó: "Harald Welte" laforge@gnumonks.org Címzett: "Sipos Csaba" sipos.csaba@kvk.uni-obuda.hu Másolatot kap: "Jacob Erlbeck" jerlbeck@sysmocom.de, "OpenBSC Mailing List" openbsc@lists.osmocom.org Elküldött üzenetek: Péntek, 2015. December 25. 17:15:51 Tárgy: Re: Osmo-PCU: make error
Hi Sipos,
On Fri, Dec 25, 2015 at 03:50:45PM +0100, Sipos Csaba wrote:
/usr/local/include/osmocom/core/prim.h:23:27: error: uninitialized const 'osmo_prim_op_names' [-fpermissive] const struct value_string osmo_prim_op_names[5];
This was introduced by one of my recent libosmocore changes, sorry.
The patch below (just pushed to libosmocore master) should fix it.
From c959afdcd9d8f227f4a72a915ac2e3f79d1d1d3b Mon Sep 17 00:00:00 2001
From: Harald Welte laforge@gnumonks.org Date: Fri, 25 Dec 2015 17:14:07 +0100 Subject: [PATCH] osmo_prim_op_names should be extern
--- include/osmocom/core/prim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h index e920eb8..9e71007 100644 --- a/include/osmocom/core/prim.h +++ b/include/osmocom/core/prim.h @@ -20,7 +20,7 @@ enum osmo_prim_operation { PRIM_OP_CONFIRM, /*!< \brief cofirm */ };
-const struct value_string osmo_prim_op_names[5]; +extern const struct value_string osmo_prim_op_names[5];
#define _SAP_GSM_SHIFT 24
Hi Harald,
It all compiles fine now. Thx for the fix :-)
Regards, Csaba
----- Eredeti üzenet ----- Feladó: "Sipos Csaba" sipos.csaba@kvk.uni-obuda.hu Címzett: "Harald Welte" laforge@gnumonks.org Másolatot kap: "OpenBSC Mailing List" openbsc@lists.osmocom.org Elküldött üzenetek: Péntek, 2015. December 25. 17:17:28 Tárgy: Re: Osmo-PCU: make error
Thx Harald, will test it and report back.
Regards, Csaba
----- Eredeti üzenet ----- Feladó: "Harald Welte" laforge@gnumonks.org Címzett: "Sipos Csaba" sipos.csaba@kvk.uni-obuda.hu Másolatot kap: "Jacob Erlbeck" jerlbeck@sysmocom.de, "OpenBSC Mailing List" openbsc@lists.osmocom.org Elküldött üzenetek: Péntek, 2015. December 25. 17:15:51 Tárgy: Re: Osmo-PCU: make error
Hi Sipos,
On Fri, Dec 25, 2015 at 03:50:45PM +0100, Sipos Csaba wrote:
/usr/local/include/osmocom/core/prim.h:23:27: error: uninitialized const 'osmo_prim_op_names' [-fpermissive] const struct value_string osmo_prim_op_names[5];
This was introduced by one of my recent libosmocore changes, sorry.
The patch below (just pushed to libosmocore master) should fix it.
From c959afdcd9d8f227f4a72a915ac2e3f79d1d1d3b Mon Sep 17 00:00:00 2001
From: Harald Welte laforge@gnumonks.org Date: Fri, 25 Dec 2015 17:14:07 +0100 Subject: [PATCH] osmo_prim_op_names should be extern
--- include/osmocom/core/prim.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/osmocom/core/prim.h b/include/osmocom/core/prim.h index e920eb8..9e71007 100644 --- a/include/osmocom/core/prim.h +++ b/include/osmocom/core/prim.h @@ -20,7 +20,7 @@ enum osmo_prim_operation { PRIM_OP_CONFIRM, /*!< \brief cofirm */ };
-const struct value_string osmo_prim_op_names[5]; +extern const struct value_string osmo_prim_op_names[5];
#define _SAP_GSM_SHIFT 24