Skip to content
This repository has been archived by the owner on Oct 27, 2020. It is now read-only.

Build fails to compile. (const-ness problems) #12

Closed
markrages opened this issue Jun 2, 2020 · 1 comment · Fixed by ngscopeclient/scopehal#133
Closed

Build fails to compile. (const-ness problems) #12

markrages opened this issue Jun 2, 2020 · 1 comment · Fixed by ngscopeclient/scopehal#133

Comments

@markrages
Copy link

On Ubuntu 18.04.

Following instructions in README, receive following error:

/home/markrages/src/scopehal-cmake/lib/scopehal/SCPILxiTransport.cpp: In constructor ‘SCPILxiTransport::SCPILxiTransport(std::__cxx11::string)’:
/home/markrages/src/scopehal-cmake/lib/scopehal/SCPILxiTransport.cpp:63:41: error: invalid conversion from ‘const char*’ to ‘char*’ [-fpermissive]
  m_device = lxi_connect(m_hostname.c_str(), m_port, "inst0", m_timeout, VXI11);
                         ~~~~~~~~~~~~~~~~^~
In file included from /home/markrages/src/scopehal-cmake/lib/scopehal/scopehal.h:49:0,
                 from /home/markrages/src/scopehal-cmake/lib/scopehal/SCPILxiTransport.cpp:36:
/usr/include/lxi.h:59:5: note:   initializing argument 1 of ‘int lxi_connect(char*, int, char*, int, lxi_protocol_t)’
 int lxi_connect(char *address, int port, char *name, int timeout, lxi_protocol_t protocol);
     ^~~~~~~~~~~
/home/markrages/src/scopehal-cmake/lib/scopehal/SCPILxiTransport.cpp:63:78: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
  m_device = lxi_connect(m_hostname.c_str(), m_port, "inst0", m_timeout, VXI11);
                                                                              ^

If I add -fpermissive to CXX_FLAGS then it compiles OK.

@azonenberg
Copy link
Owner

Known issue (ngscopeclient/scopehal#131). Closing as duplicate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants