earthenterprise
earthenterprise copied to clipboard
compilation terminated due to -Wfatal-errors.
How to solve? Ubuntu 18.04 building GEE with "python2.7 /usr/bin/scons -j8 release=1 build
"
if (default_instance_ == NULL) protobuf_AddDesc_diorama_5fstreaming_2eprotodevel();
....
NATIVE-REL-x86_64/protobuf/diorama_streaming.pb.cc: In static member function 'static const keyhole::DioramaMetadata_Object& keyhole::DioramaMetadata_Object::default_instance()':
NATIVE-REL-x86_64/protobuf/diorama_streaming.pb.cc:383:3: error: this 'if' clause does not guard... [-Werror=misleading-indentation]
if (default_instance_ == NULL) protobuf_AddDesc_diorama_5fstreaming_2eprotodevel(); return *default_instance_;
^~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
Overcame this by wrapping
if (default_instance_ == NULL) whatever
to
if (default_instance_ == NULL) {whatever}
but got next
common/geFilePool.cpp:572:77: error: throw will always call terminate() [-Werror=terminate]
throw khSimpleException("geFilePool::~Writer: write buffer not flushed.");
next looks really scary, 10 times of
In file included from common/khxml/khxml.cpp:19:0:
common/khxml/khdom.h: In function 'void FromAttribute(xercesc_3_2::DOMAttr*, QString&)':
common/khxml/khdom.h:712:41: error: invalid conversion from 'const XMLCh* {aka const char16_t*}' to 'const short unsigned int*' [-fpermissive]
val = QString::fromUcs2(attr->getValue());
~~~~~~~~~~~~~~^~
In file included from common/khxml/khxml.h:33:0,
from common/khxml/khxml.cpp:18:
NATIVE-REL-x86_64/include/qstring.h:673:20: note: initializing argument 1 of 'static QString QString::fromUcs2(const short unsigned int*)'
static QString fromUcs2( const unsigned short *ucs2 );
^~~~~~~~
Currently, we do not actively support Ubuntu 18, so these errors are more or less new to us as well. For the invalid conversion, we have run into this with exploratory builds on other platforms and found that casting the parameter of fromUcs2
as (const ushort*)
should get you by that error. However, its likely that you will run into further errors (especially if you are using a newer version of GCC). If you would like to use OpenGEE without hassle I'd recommend using a supported platform (Ubuntu 16, CentOS/Redhat 6/7) if possible.
@tst-cjeffries thanks for your attention and clear answer. May be I will end up with raising RedHat 7 in VM (seems if having RPM no need to build anything?). But for now I wish to try [-fpermissive] + without [-Werror] - may be this helps ... if I find the place for this directives, project structure not clear to me
Most of the compilation flags can be found in earthenterprise/earth_enterprise/src/SConstruct
just you should be able to remove Werror
and add fpermissive
there. Good luck!
++ remove lines here
src/third_party/gif/SConscript:cc_flags.remove('-Werror')
src/third_party/glu/SConscript:cc_flags.remove('-Werror')
src/fusion/portableglobe/servers/fileunpacker/shared/SConscript:cc_flags.remove('-Werror')
src/third_party/skia/SConscript
src/google/protobuf/SConscript
src/fusion/gepublish/SConscript
well, it went more far, but failed. Seems I should use RH7 on VM
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ber_free@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_get_option@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_sasl_bind@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_err2string@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_pvt_url_scheme2proto@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_abandon_ext@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_get_attribute_ber@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_init_fd@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_next_message@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_url_parse@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_get_dn_ber@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_msgfree@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_result@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ber_memfree@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_first_message@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_parse_result@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ber_sockbuf_add_io@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_unbind_ext@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_free_urldesc@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_msgtype@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_memfree@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_search_ext@OPENLDAP_2.4_2'
//usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4: undefined reference to `ldap_set_option@OPENLDAP_2.4_2'
collect2: error: ld returned 1 exit status
scons: *** [NATIVE-REL-x86_64/bin/tests/idl_tests] Error 1
scons: building terminated because of errors.
scons: *** [build] Error 2
scons: building terminated because of errors.
@tst-cjeffries I finished up with raising separate server server with Ubuntu16 and all was fine except one small issue ( https://github.com/google/earthenterprise/issues/1739 )
Next question is a bit offtopic, but may be you can clarify - I was not able to google that https://groups.google.com/forum/#!topic/google-earth-enterprise/cmON-5W4Weo
@nop1984 looks like we haven't responded to you in a while. Did you get your problems fixed or are you still having issues?