bug-global
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HELP!!! issue when complier the gtags


From: Hideki IWAMOTO
Subject: Re: HELP!!! issue when complier the gtags
Date: Thu, 16 May 2019 23:24:16 +0900

Sorry. Since the default mode of recent compilers is C11,
I did not consider about compilers that are in C90 mode by default.

If the compiler you are using is gcc
  ./configure CC=c99
Is equivalent to
  ./configure CC='gcc -std=c99'
This defines the macro __STRICT_ANSI__.

I think that you can avoid the problem by using.
  ./configure CC='gcc -std=gnu99'


On Thu, 16 May 2019 09:58:18 +0800 (CST)
zYe  <address@hidden> wrote:

> 
> 
> Hi:
> 
> 
> Thanks for your reply.
> 
> 
> If I didn't specify the "c99", just follow the steps like:
> % sh reconf.sh 
> % ./configure
> % make
> Then I would get error like this:
> find.c: In function ‘findassign’:
> find.c:557:2: error: ‘for’ loop initial declarations are only allowed in C99 
> mode
>   for (int i = 0; opts[i] != NULL; i++) {
>   ^
> some functions are only allowed in C99 mode.
> As your recommend, if not need to use the C99 mode, hence how I could 
> complier the source code? 
> Could you please give some suggestions about the command I should use.
> 
> 
> Thanks a lot!
> 
> 
> Regards,
> Jude
> 
> 
> 
> 
> 
> 
> 
> At 2019-05-16 03:08:41, "Hideki IWAMOTO" <address@hidden> wrote:
> >Hi.  
> >
> >The global source code has problems with compiling in strict ANSI mode.
> >
> >One of them is the elimination of __attribute__ using macros in strict ANSI 
> >mode.
> >This affects the definition of inline functions in the glibc header.
> >This has been fixed in the CVS repository.
> >http://cvs.savannah.gnu.org/viewcvs/global/gtags-cscope/global-cscope.h?cvsroot=global&r1=1.8&r2=1.9
> >http://cvs.savannah.gnu.org/viewcvs/global/libutil/die.h?cvsroot=global&r1=1.17&r2=1.18
> >http://cvs.savannah.gnu.org/viewcvs/global/libutil/statistics.h?cvsroot=global&r1=1.5&r2=1.6
> >http://cvs.savannah.gnu.org/viewcvs/global/libutil/strbuf.h?cvsroot=global&r1=1.32&r2=1.33
> >
> >Another problem is that the code generated by flex includes the standard 
> >headers before including "config.h".
> >This has not been fixed yet.
> >
> >I recommend not specifying "CC=c99" in the configure script's arguments.
> >
> >
> >On Wed, 15 May 2019 10:41:20 +0800 (CST)
> >zYe <address@hidden> wrote:
> >
> >> Hey guys:
> >> 
> >> 
> >> I downloaded the newest version of global(v6.6.3), wanted to complier it 
> >> in my centOS system. run the commend as below:
> >> 
> >> 
> >> - ./configure CC=c99
> >> - sudo make
> >> 
> >> 
> >> The issue happened after I running the "make" command, I got lots errors 
> >> like:
> >> 
> >> 
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strspn_c3':
> >> /usr/include/bits/string2.h:1072: multiple definition of `__strspn_c3'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1072: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strpbrk_c2':
> >> /usr/include/bits/string2.h:1126: multiple definition of `__strpbrk_c2'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1126: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strpbrk_c3':
> >> /usr/include/bits/string2.h:1137: multiple definition of `__strpbrk_c3'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1137: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strtok_r_1c':
> >> /usr/include/bits/string2.h:1175: multiple definition of `__strtok_r_1c'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1175: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strsep_1c':
> >> /usr/include/bits/string2.h:1223: multiple definition of `__strsep_1c'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1223: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strsep_2c':
> >> /usr/include/bits/string2.h:1234: multiple definition of `__strsep_2c'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1234: first 
> >> defined here
> >> ../libutil/libgloutil.a(secure_popen.o): In function `__strsep_3c':
> >> /usr/include/bits/string2.h:1262: multiple definition of `__strsep_3c'
> >> ../libutil/libgloutil.a(args.o):/usr/include/bits/string2.h:1262: first 
> >> defined here
> >> collect2: error: ld returned 1 exit status
> >> make[2]: *** [global] Error 1
> >> make[2]: Leaving directory `/tmp/global-6.6.3/global'
> >> make[1]: *** [all-recursive] Error 1
> >> make[1]: Leaving directory `/tmp/global-6.6.3'
> >> make: *** [all] Error 2
> >> 
> >> 
> >> 
> >> 
> >> It seems like a link issue, could you please give me some suggestion to 
> >> solve it? I really want to use the gtags tool.
> >> 
> >> 
> >> Thanks a lot.
> >> 
> >> 
> >> Regards,
> >> Jude
> >
> >-- 
> >Hideki IWAMOTO <address@hidden>

-- 
Hideki IWAMOTO <address@hidden>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]