[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Texmacs-dev] 1.0.1.17 build failure
From: |
David Allouche |
Subject: |
Re: [Texmacs-dev] 1.0.1.17 build failure |
Date: |
Tue, 8 Jul 2003 18:25:17 +0200 |
User-agent: |
Mutt/1.5.4i |
On Mon, Jul 07, 2003 at 12:20:04PM -0400, Gregory Wright wrote:
>
> On OS X 10.2.6 (with gcc 3.1) an attempt to build 1.0.1.17 fails with
> the included
> error log. Perhaps an issue with gcc's preprocessor on OS X?
>
> g++ -I./System -I./System/Boot -I./System/Classes -I./System/Files
> -I./System/Connect -I./System/Misc -I./Classes/Abstract
> -I./Classes/Atomic -I./Classes/Compound -I./Data/Drd -I./Data/String
> -I./Data/Tree -I./Data/Convert -I./Guile -I./Resource
> -I/Users/gwright/src/darwinports/dports/editors/TeXmacs/work/TeXmacs-
> 1.0.1.17-src/TeXmacs/include -I/opt/local/include -Wall
> -Wno-return-type -fno-rtti -fno-exceptions -g -I/opt/local/include
> -c ./Data/Convert/Connect/connection.cpp -o Objects/connection.o
> In file included from System/Connect/pipe_link.hpp:15,
> from Data/Convert/connect.hpp:15,
> from Data/Convert/Connect/connection.cpp:13:
> System/Connect/link.hpp:53: syntax error before `&' token
> System/Connect/link.hpp:57: parse error before `)' token
> System/Connect/link.hpp:58: parse error before `,' token
> Data/Convert/Connect/connection.cpp:41: 'link' is used as a type, but
> is not defined as a type.
> Data/Convert/Connect/connection.cpp:48: type specifier omitted for
> parameter `link'
I have same problem on Debian/Testing with g++ 3.3.1.
I traced it to a nasty name conflict with a function defined in
unistd.h. This conflict can be made obvious by adding this line
typedef struct link link;
just after the definition of "struct link". This yields the following
error:
g++ -I./System -I./System/Boot -I./System/Classes -I./System/Files
-I./System/Connect -I./System/Misc -I./Classes/Abstract
-I./Classes/Atomic -I./Classes/Compound -I./Data/Drd -I./Data/String
-I./Data/Tree -I./Data/Convert -I./Guile -I./Resource
-I/usr/local/src/TeXmacs-1.0.1.17-src/TeXmacs/include -Wall
-Wno-return-type -O3 -fexpensive-optimizations -fno-rtti
-fno-exceptions -c ./Data/Convert/Connect/connection.cpp -o
Objects/connection.o
In file included from System/Connect/pipe_link.hpp:15,
from Data/Convert/connect.hpp:15,
from Data/Convert/Connect/connection.cpp:13:
System/Connect/link.hpp:53: error: `typedef struct link link'
redeclared as different kind of symbol
/usr/include/unistd.h:697: error: previous declaration of `int
link(const char*, const char*)'
make: *** [Objects/connection.o] Error 1
I see two ways to fix this:
-- Rename "struct link" to something else to avoid the conflict.
-- Actually use C++ namespaces in texmacs to avoid putting internal
definitions in the global namespace.
The latter solution would arguably be the best
--
-- ddaa