bugCERTI - Bugs: bug #20849, CVS does not compile under Gentoo64

 
 

bug #20849: CVS does not compile under Gentoo64

Submitted by:  Jeff <zaphod46>
Submitted on:  Tue 21 Aug 2007 03:41:51 PM UTC  
 
Category: CERTISeverity: 5 - Blocker
Item Group: Compilation errorStatus: Fixed
Privacy: PublicAssigned to: Eric NOULARD <erk>
Open/Closed: ClosedRelease: CVS
Reproducibility: Every TimeFixed Release: 3.2.5

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 28 Aug 2007 07:03:10 AM UTC, comment #6:

Ok right.
I did check that generated files:
syntax.cc
syntax.h
y.tab.c
y.tab.h
are not in CVS but they were bundled in the source tarball
which is the current mistake I will fix.

>I tried using CMake instead of autotools and did the following:
>cmake .
>make


With cmake it is usually a better idea to
separate build tree from source tree,
(note that you may separate build tree from source
tree with autotools too)
Using CMake you may do it like that:

in your case something like

should be OK.
Before that you must clean-up your certi_cvs
directory from CMake generated file with something like

Note the use of -ok option in order to confirm each deletion
in order to avoid incidental wrong match.

>This time, however, removing syntax.cc and even syntax.h
>did not seem to fix the problem.


In fact in this case CMake is wiser than autotools
since syntax.yy and tokens.ll are not modified
the previously built lib is not rebuilt despite
syntax.cc is missing...

A better way to trigger regeneration + recompile
would be to "touch syntax.yy tokens.ll", I should
have propose you this in the first place.

> In an interesting twist, if I do autotools,
> then cmake . && make, it seems to compile just fine.


Yep it's ok since configure step did regenerate
syntax.cc/syntax.h.

Note that when you run cmake in the source tree
the autotools generated Makefile are overwritten
with cmake ones.

> I don't know enough about CMake to know what to make of this.


I'll give a CMake introduction on certi mailing list
in order to explain why we think it may be valuable
switch to go from autotools to cmake.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 28 Aug 2007 03:34:18 AM UTC, comment #5:

I tried using CMake instead of autotools and did the following:
cmake .
make

I got part way through and got the same error message:
[ 56%] Building CXX object libCERTI/CMakeFiles/CERTI.dir/syntax.o
y.tab.c:315: error: declaration of C function 'char* getenv()' conflicts with
/usr/include/gentoo-multilib/amd64/stdlib.h:660: error: previous declaration 'char* getenv(const char*)' here
/home/jeff/delta3dDeps/certi_cvs/libCERTI/syntax.yy:40: error: previous declaration of 'int yylex()' with 'C++' linkage
y.tab.c:316: error: conflicts with new declaration with 'C' linkage
make[2]: *** [libCERTI/CMakeFiles/CERTI.dir/syntax.o] Error 1
make[1]: *** [libCERTI/CMakeFiles/CERTI.dir/all] Error 2
make: *** [all] Error 2

This time, however, removing syntax.cc and even syntax.h did not seem to fix the problem. If I do a make clean and then ./configure && make, everything builds just fine.

I am not sure how useful it is, but here is my cmake configure output:
-- Configuring CERTI version 3.2.5pre4
-- Looking for lex...
-- Looking for lex... - found lex is /usr/bin/flex
-- Looking for yacc...
-- Looking for yacc... - found yacc is /usr/bin/yacc
-- Looking for RPMTools... - rpmbuild NOT FOUND
-- *** CERTI has been successfully configured ********
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jeff/delta3dDeps/certi_cvs

In an interesting twist, if I do autotools, then cmake . && make, it seems to compile just fine.

I don't know enough about CMake to know what to make of this.

Jeff <zaphod46>
Mon 27 Aug 2007 11:02:04 PM UTC, comment #4:

I would say, if it is automatically generated, then don't ship it. It introduces problems like this and anything that simplifies the repository, in my experience, is a good thing.

Gentoo does have some 32-bit libs for compatibility, but I am not sure about headers.

Jeff <zaphod46>
Mon 27 Aug 2007 01:21:54 PM UTC, comment #3:

I think we should not ship syntax.cc but regenerates it each time.
It used to be a portable file but the fact is it is not
on some 64 bits config.

Gentoo may be a "pure" 64-bits whereas Fedora 64bits used
to be installed with 32-bits compatibility headers and libs.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Wed 22 Aug 2007 02:40:01 AM UTC, comment #2:

Deleting the syntax.cc file seemed to do the trick. Thanks!

Just in case, my config log is attached and I am using:
gcc (GCC) 4.1.2 (Gentoo 4.1.2)
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

(file #13761)

Jeff <zaphod46>
Tue 21 Aug 2007 04:25:41 PM UTC, comment #1:

Strange we did build CERTI on Fedora Core 6 64bits box
no such trouble...

Could you please remove syntax.cc file
(it should be regenerated by bison automatically)

What is your gcc version?
Would you please include the log of the configure step?

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Tue 21 Aug 2007 03:41:51 PM UTC, original submission:

g++ -DHAVE_CONFIG_H -I. -I.. -I../include -I/usr/include/libxml2 -DHAVE_XML -g -O2 -DHAVE_TSC_CLOCK -DRTI_USES_STD_FSTREAM -DHAVE_POSIX_CLOCK -MT syntax.lo -MD -MP -MF .deps/syntax.Tpo -c syntax.cc -fPIC -DPIC -o .libs/syntax.o
y.tab.c:315: error: declaration of C function 'char* getenv()' conflicts with
/usr/include/gentoo-multilib/amd64/stdlib.h:660: error: previous declaration 'char* getenv(const char*)' here
/home/jeff/delta3dDeps/certi_cvs/libCERTI/syntax.yy:40: error: previous declaration of 'int yylex()' with 'C++' linkage
y.tab.c:316: error: conflicts with new declaration with 'C' linkage
make[2]: *** [syntax.lo] Error 1
make[2]: Leaving directory `/home/jeff/delta3dDeps/certi_cvs/libCERTI'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jeff/delta3dDeps/certi_cvs'
make: *** [all] Error 2

Jeff <zaphod46>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #13761:  config.log added by zaphod46 (87KiB - application/octet-stream - my configure log)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by erk (Posted a comment)
  • -unavailable- added by zaphod46 (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 19 Nov 2007 02:33:01 PM UTCerkOpen/ClosedOpen=>Closed
    Mon 19 Nov 2007 02:32:53 PM UTCerkStatusIn Progress=>Fixed
      Fixed ReleaseUnknown=>3.2.5
    Mon 27 Aug 2007 01:21:54 PM UTCerkStatusNone=>In Progress
      Assigned toNone=>erk
    Wed 22 Aug 2007 02:40:01 AM UTCzaphod46Attached File-=>Added config.log, #13761

    Back to the top


    Powered by Savane 3.1-cleanup1