Arch linux compilation errors.

Hi

Im new to Tango software. Im trying to compile tango on Arch linux for my project. I tried to install it from Arch aur repositories without success. I got same during manual compilation. Below you can see part of error trace.

make[5]: Entering directory '/home/arek/.cache/yay/tango/src/tango-9.3.4/lib/cpp/client'
CXX dbapi_class.lo
CXX dbapi_server.lo
CXX dbapi_datum.lo
CXX dbapi_base.lo
CXX dbapi_device.lo
CXX dbapi_history.lo
CXX dbapi_attribute.lo
CXX dbapi_cache.lo
CXX dbapi_serverdata.lo
CXX devapi_attr.lo
CXX devapi_base.lo
CXX devapi_data.lo
devapi_data.cpp: In function ‘std::ostream& Tango::operator<<(std::ostream&, Tango::DeviceData&)’:
devapi_data.cpp:2330:24: error: ambiguous overload for ‘operator>>=’ (operand types are ‘CORBA::Any_var’ and ‘long long int’)
2330 | dd.any >>= ll_tmp;
| ~~~~~~~^~~~~~~~~~
In file included from /usr/include/omniORB4/CORBA.h:116,
from ../../../lib/cpp/server/idl/tango.h:6,
from ../../../lib/cpp/server/tango.h:46,
from devapi_data.cpp:35:
/usr/include/omniORB4/CORBA_Any_vartypes.h:182:18: note: candidate: ‘CORBA::Boolean CORBA::Any_var::operator>>=(CORBA::Short&) const’ (near match)
182 | inline Boolean operator>>=(Short& s) const {
| ^~~~~~~~
/usr/include/omniORB4/CORBA_Any_vartypes.h:182:18: note: conversion of argument 1 would be ill-formed:
devapi_data.cpp:2330:28: error: cannot bind non-const lvalue reference of type ‘CORBA::Short&’ {aka ‘short int&’} to a value of type ‘long long int’
2330 | dd.any >>= ll_tmp;
| ^~~~~~
In file included from /usr/include/omniORB4/CORBA.h:116,
from ../../../lib/cpp/server/idl/tango.h:6,
from ../../../lib/cpp/server/tango.h:46,
from devapi_data.cpp:35:
/usr/include/omniORB4/CORBA_Any_vartypes.h:185:18: note: candidate: ‘CORBA::Boolean CORBA::Any_var::operator>>=(CORBA::UShort&) const’ (near match)
185 | inline Boolean operator>>=(UShort& u) const {
| ^~~~~~~~
/usr/include/omniORB4/CORBA_Any_vartypes.h:185:18: note: conversion of argument 1 would be ill-formed:
devapi_data.cpp:2330:28: error: cannot bind non-const lvalue reference of type ‘CORBA::UShort&’ {aka ‘short unsigned int&’} to a value of type ‘long long int’
2330 | dd.any >>= ll_tmp;
| ^~~~~~
In file included from /usr/include/omniORB4/CORBA.h:116,
from ../../../lib/cpp/server/idl/tango.h:6,
from ../../../lib/cpp/server/tango.h:46,
from devapi_data.cpp:35:
/usr/include/omniORB4/CORBA_Any_vartypes.h:188:18: note: candidate: ‘CORBA::Boolean CORBA::Any_var::operator>>=(CORBA::Long&) const’ (near match)
188 | inline Boolean operator>>=(Long& l) const {
| ^~~~~~~~
/usr/include/omniORB4/CORBA_Any_vartypes.h:188:18: note: conversion of argument 1 would be ill-formed:
devapi_data.cpp:2330:28: error: cannot bind non-const lvalue reference of type ‘CORBA::Long&’ {aka ‘int&’} to a value of type ‘long long int’
2330 | dd.any >>= ll_tmp;
| ^~~~~~
In file included from /usr/include/omniORB4/CORBA.h:116,
from ../../../lib/cpp/server/idl/tango.h:6,
from ../../../lib/cpp/server/tango.h:46,
from devapi_data.cpp:35:
/usr/include/omniORB4/CORBA_Any_vartypes.h:191:18: note: candidate: ‘CORBA::Boolean CORBA::Any_var::operator>>=(CORBA::ULong&) const’ (near match)
191 | inline Boolean operator>>=(ULong& u) const {
| ^~~~~~~~
/usr/include/omniORB4/CORBA_Any_vartypes.h:191:18: note: conversion of argument 1 would be ill-formed:
devapi_data.cpp:2330:28: error: cannot bind non-const lvalue reference of type ‘CORBA::ULong&’ {aka ‘unsigned int&’} to a value of type ‘long long int’
2330 | dd.any >>= ll_tmp;


For me it looks like sime corba version issue. Did anyone had similar issues ? Any hints on how to solve it ?

Thanks
Arek
Hi Arek,

Welcome!

Are you trying to compile on 32 bits?
It looks like ll_tmp is defined as a long long in your use case, meaning TANGO_LONG32 is defined.
TANGO_LONG32 is defined when the sizeof of a long is 8.

Could you please confirm you're trying to build in 32 bits?
What version of CORBA are you using? Is it a 32 bits version too?

Kind regards,
Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Hi

Im trying to compile for x86_64

This is my ./configure command

./configure –host=x86_64 –enable-java=yes –enable-mariadb=yes –enable-dbserver=yes –enable-dbcreate=yes –with-mysql-admin=root –with-mysql-admin-passwd='my_secret_pwd' –prefix=/usr/local/tango


Or maybe im doing it wrong ? I also tried to build with host=i686 and some others and i got same issue. Any hints on that ? Is there anything that i could provide you which would help to analyze it ?

My Tango source is from latest release from tango web for linux.

Thanks
Arek
@agibes: Can you post your configure.log file? And did you try https://aur.archlinux.org/packages/tango already?
Hi

Yes i tried both ways doing it manualy and via arch aur repo. In both ways i got same error.

Thanks
Arek
Sorry, I made some mistakes in my previous comment.

TANGO_LONG32 is defined when the sizeof(long) is different than 8!

Could you please have a look at the definition of SIZEOF_LONG in omniORB4/acconfig.h in your use case?

In my use case on a 64 bits system, I get:

/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
This is the part of acconfig.h file:

/* The size of `bool', as computed by sizeof. */
#define SIZEOF_BOOL 1

/* The size of `char', as computed by sizeof. */
#define SIZEOF_CHAR 1

/* The size of `double', as computed by sizeof. */
#define SIZEOF_DOUBLE 8

/* The size of `float', as computed by sizeof. */
#define SIZEOF_FLOAT 4

/* The size of `int', as computed by sizeof. */
#define SIZEOF_INT 4

/* The size of `long', as computed by sizeof. */
#define SIZEOF_LONG 8

/* The size of `long double', as computed by sizeof. */
#define SIZEOF_LONG_DOUBLE 16

/* The size of `long long', as computed by sizeof. */
#define SIZEOF_LONG_LONG 8

/* The size of `short', as computed by sizeof. */
#define SIZEOF_SHORT 2

/* The size of `unsigned char', as computed by sizeof. */
#define SIZEOF_UNSIGNED_CHAR 1

/* The size of `void*', as computed by sizeof. */
#define SIZEOF_VOIDP 8

/* The size of `wchar_t', as computed by sizeof. */
#define SIZEOF_WCHAR_T 4


Is it correct that LONG and LONG LONG have same sizes ?
Ohhh i found that i have more of those files. In /usr/include/omniORB4/acconfig.h i found tha it uses some OMNI_ prefix. I guese that's the default header file that is used during forte compilation.

/* The size of `bool', as computed by sizeof. */
#define OMNI_SIZEOF_BOOL 1

/* The size of `char', as computed by sizeof. */
#define OMNI_SIZEOF_CHAR 1

/* The size of `double', as computed by sizeof. */
#define OMNI_SIZEOF_DOUBLE 8

/* The size of `float', as computed by sizeof. */
#define OMNI_SIZEOF_FLOAT 4

/* The size of `int', as computed by sizeof. */
#define OMNI_SIZEOF_INT 4

/* The size of `long', as computed by sizeof. */
#define OMNI_SIZEOF_LONG 8

/* The size of `long double', as computed by sizeof. */
#define OMNI_SIZEOF_LONG_DOUBLE 16

/* The size of `long long', as computed by sizeof. */
#define OMNI_SIZEOF_LONG_LONG 8

/* The size of `short', as computed by sizeof. */
#define OMNI_SIZEOF_SHORT 2

/* The size of `unsigned char', as computed by sizeof. */
#define OMNI_SIZEOF_UNSIGNED_CHAR 1

/* The size of `void*', as computed by sizeof. */
#define OMNI_SIZEOF_VOIDP 8

/* The size of `wchar_t', as computed by sizeof. */
#define OMNI_SIZEOF_WCHAR_T 4

/* Define to the type of getsockname's third argument */
#define OMNI_SOCKNAME_SIZE_T socklen_t

Edited 2 years ago
Indeed this could probably explain the compilation error you're seeing.
Do you know what version of omniORB is installed under /usr/include/omniORB4?
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Im not sure but it looks like default package from AUR is 4.3.0.1 https://aur.archlinux.org/packages/omniorb I also did quick test with adding those defines without prefixes below and it works i can compile it. But it's not a best way to edit include files :( The question is if i didn't mess up something by doing that.

Thanks
Arek
Edited 2 years ago
 
Register or login to create to post a reply.