praserocking / google-gtags

Automatically exported from code.google.com/p/google-gtags
GNU General Public License v2.0
0 stars 1 forks source link

Build error. #14

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What is the problem?

Cannot build.

What steps will reproduce the problem?

./configure
make
scons/scons.py -Q
  File "./scons/scons-local-0.96.1/SCons/Tool/gas.py", line 36

    import as
            ^
SyntaxError: invalid syntax

make: *** [all] Error 2

What is the expected output? What do you see instead?

Expected it to build google-gtags.

What version of the product are you using? On what operating system?

google-gtags-2.0.0
Ubuntu 12.04
Python 2.7.3

Please provide any additional information below.

Installed Ubuntu scons 2.1.0-1 package and then executed scons in the 
google-gtags-2.0.0 directory. Following are the steps:

scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o filename.o -c filename.cc
In file included from /usr/include/c++/4.6/ext/hash_set:61:0,
                 from symboltable.h:31,
                 from filename.h:37,
                 from filename.cc:26:
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated. [-Wcpp]
In file included from filename.h:37:0,
                 from filename.cc:26:
symboltable.h: In member function 'bool SymbolTable::StrEq::operator()(const 
char*, const char*) const':
symboltable.h:54:28: error: 'strcmp' was not declared in this scope
In file included from filename.cc:26:0:
filename.h: In member function 'const char* Filename::GetString(const char*)':
filename.h:91:39: error: 'strlen' was not declared in this scope
filename.h:92:41: error: 'strncpy' was not declared in this scope
filename.cc: In member function 'bool Filename::operator<(const Filename&) 
const':
filename.cc:76:40: error: 'strcmp' was not declared in this scope
filename.cc: In member function 'bool Filename::operator==(const Filename&) 
const':
filename.cc:93:52: error: 'strcmp' was not declared in this scope
filename.cc: In member function 'int Filename::DistanceTo(const Filename&) 
const':
filename.cc:113:30: error: 'strcmp' was not declared in this scope
filename.cc: In member function 'const char* Filename::Basename() const':
filename.cc:141:47: error: 'strlen' was not declared in this scope
scons: *** [filename.o] Error 1
scons: building terminated because of errors.

Original issue reported on code.google.com by asif.has...@gmail.com on 10 Jan 2014 at 10:43

GoogleCodeExporter commented 8 years ago
Resolution:

For Ubuntu 12.04
with g++ 4:4.6.3-1ubuntu5.

sudo apt-get install scons scons-doc

Now use scons to build google-gtags.
But first there are g++ header missing problems:

In filename.h:
#include <string.h>

In tagsutil.h
#include <cstdlib>

In iterators.h
#include <cstdio>

In symboltable.h
#include <cstring>

In file.h
#include <cstdio>

Now execute scons to build google-gtags.
scons

NOTE: There is one more warning message:

g++ -o gtags.o -c gtags.cc
In file included from /usr/include/c++/4.6/ext/hash_map:61:0,
                 from tagsoptionparser.h:43,
                 from gtags.cc:49:
/usr/include/c++/4.6/backward/backward_warning.h:33:2: warning: #warning This 
file includes at least one deprecated or antiquated header which may be removed 
without further notice at a future date. Please use a non-deprecated interface 
with equivalent functionality instead. For a listing of replacement headers and 
interfaces, consult the file backward_warning.h. To disable this warning use 
-Wno-deprecated. [-Wcpp]

Original comment by asif.has...@gmail.com on 11 Jan 2014 at 1:01

GoogleCodeExporter commented 8 years ago
On emacs gtags-find-tag fails even after restarting gtagsmixer:

gtags-cannot-connect: Cannot connect to mixer.  Please type M-x 
gtags-restart-gtags-mixer and try again.

Original comment by asif.has...@gmail.com on 11 Jan 2014 at 1:43

GoogleCodeExporter commented 8 years ago
On Ubunntu 14.04, still cannot build (with scons and the header edits described 
above). 

#warning \
  ^
In file included from filewatcher.h:30:0,
                 from filewatcher.cc:19:
inotify-syscalls.h: In function 'int inotify_init()':
inotify-syscalls.h:48:35: error: 'syscall' was not declared in this scope
  return syscall (__NR_inotify_init);
                                   ^
inotify-syscalls.h: In function 'int inotify_add_watch(int, const char*, 
__u32)':
inotify-syscalls.h:53:56: error: 'syscall' was not declared in this scope
  return syscall (__NR_inotify_add_watch, fd, name, mask);
                                                        ^
inotify-syscalls.h: In function 'int inotify_rm_watch(int, __u32)':
inotify-syscalls.h:58:47: error: 'syscall' was not declared in this scope
  return syscall (__NR_inotify_rm_watch, fd, wd);
                                               ^
In file included from filewatcher.cc:19:0:
filewatcher.h: In destructor 'virtual 
InotifyFileWatcher::~InotifyFileWatcher()':
filewatcher.h:341:14: error: 'close' was not declared in this scope
     close(fd_);
              ^
filewatcher.h: In member function 'virtual int 
InotifyFileWatcher::ReadEvents()':
filewatcher.h:392:48: error: 'read' was not declared in this scope
     return read(fd_, event_buffer_, kBufferSize);
                                                ^
scons: *** [filewatcher.o] Error 1
scons: building terminated because of errors.

Original comment by chas...@gmail.com on 16 Jul 2014 at 1:18