Problem with STL / use_facet ...

Hi,

any idea where I can find the second definition of ‘use_facet’ ??

Armin

rm -f .libs/CompIO.lo
QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-Wp,-MD,.deps/CompIO.pp -c CompIO.cpp -fPIC -DPIC -o .libs/CompIO.lo

{standard input}: Assembler messages:
{standard input}:61466: Fatal error: Symbol use_facet__FRCQ23std6locale
already defined.
cc: /usr/ntox86/bin/as error 1

/usr/include/xlocale:
In method `std::basic_filebuf<char,std::char_traits

::~basic_filebuf()’:
/usr/include/xlocale:509: output pipe has been closed

cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1plus error 33
make[1]: *** [CompIO.lo] Error 1
make[1]: Leaving directory `/openqnx/qtez-0.93.5/src/components’
make: *** [all-recursive] Error 1

Hi,

renaming of ‘use_facet’ to something else in ‘xlocale’ shows that there
is no second definition of ‘use_facet’

Any comments from ‘our master collin’ ??

Armin


Armin Steinhoff wrote:

Hi,

any idea where I can find the second definition of ‘use_facet’ ??

Armin

rm -f .libs/CompIO.lo
QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-Wp,-MD,.deps/CompIO.pp -c CompIO.cpp -fPIC -DPIC -o .libs/CompIO.lo

{standard input}: Assembler messages:
{standard input}:61466: Fatal error: Symbol use_facet__FRCQ23std6locale
already defined.
cc: /usr/ntox86/bin/as error 1

/usr/include/xlocale:
In method std::basic_filebuf<char,std::char_traits<char ::~basic_filebuf()': /usr/include/xlocale:509: output pipe has been closed cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1plus error 33 make[1]: *** [CompIO.lo] Error 1 make[1]: Leaving directory /openqnx/qtez-0.93.5/src/components’
make: *** [all-recursive] Error 1

Armin Steinhoff <a-steinhoff@web_.de> wrote:

Hi,

renaming of ‘use_facet’ to something else in ‘xlocale’ shows that there
is no second definition of ‘use_facet’

Any comments from ‘our master collin’ ??

Can you mail me the preprocessed file?

QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-P CompIO.cpp -fPIC -DPIC -o CompIO.ii


Armin Steinhoff wrote:

Hi,

any idea where I can find the second definition of ‘use_facet’ ??

Armin

rm -f .libs/CompIO.lo
QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-Wp,-MD,.deps/CompIO.pp -c CompIO.cpp -fPIC -DPIC -o .libs/CompIO.lo

{standard input}: Assembler messages:
{standard input}:61466: Fatal error: Symbol use_facet__FRCQ23std6locale
already defined.
cc: /usr/ntox86/bin/as error 1

/usr/include/xlocale:
In method std::basic_filebuf<char,std::char_traits<char ::~basic_filebuf()': /usr/include/xlocale:509: output pipe has been closed cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1plus error 33 make[1]: *** [CompIO.lo] Error 1 make[1]: Leaving directory /openqnx/qtez-0.93.5/src/components’
make: *** [all-recursive] Error 1


cburgess@qnx.com

The problem seems to be introduced by the -fguiding-decls option,
which shouldn’t be used (note especially the last paragraph)

-fguiding-decls
Treat a function declaration with the same type as a potential function
template instantiation as though it declares that instantiation, not a
normal function. If a definition is given for the function later in the
translation unit (or another translation unit if the target supports
weak symbols), that definition will be used; otherwise the template will
be instantiated. This behavior reflects the C++ language prior to
September 1996, when guiding declarations were removed.

This option implies -fname-mangling-version-0, and will not work with
other name mangling versions. Like all options that change the ABI, all
C++ code, including libgcc.a must be built with the same setting of this
option.

Armin Steinhoff <a-steinhoff@web_.de> wrote:

Hi,

any idea where I can find the second definition of ‘use_facet’ ??

Armin

rm -f .libs/CompIO.lo
QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-Wp,-MD,.deps/CompIO.pp -c CompIO.cpp -fPIC -DPIC -o .libs/CompIO.lo

{standard input}: Assembler messages:
{standard input}:61466: Fatal error: Symbol use_facet__FRCQ23std6locale
already defined.
cc: /usr/ntox86/bin/as error 1

/usr/include/xlocale:
In method std::basic_filebuf<char,std::char_traits<char ::~basic_filebuf()': /usr/include/xlocale:509: output pipe has been closed cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1plus error 33 make[1]: *** [CompIO.lo] Error 1 make[1]: Leaving directory /openqnx/qtez-0.93.5/src/components’
make: *** [all-recursive] Error 1


cburgess@qnx.com

Colin Burgess wrote:

The problem seems to be introduced by the -fguiding-decls option,
which shouldn’t be used (note especially the last paragraph)

Yes it is the case … I have removed that option and all is working.

Thanks a lot for your help.

Armin


-fguiding-decls
Treat a function declaration with the same type as a potential function
template instantiation as though it declares that instantiation, not a
normal function. If a definition is given for the function later in the
translation unit (or another translation unit if the target supports
weak symbols), that definition will be used; otherwise the template will
be instantiated. This behavior reflects the C++ language prior to
September 1996, when guiding declarations were removed.

This option implies -fname-mangling-version-0, and will not work with
other name mangling versions. Like all options that change the ABI, all
C++ code, including libgcc.a must be built with the same setting of this
option.

Armin Steinhoff <a-steinhoff@web_.de> wrote:

Hi,

any idea where I can find the second definition of ‘use_facet’ ??

Armin

rm -f .libs/CompIO.lo
QCC -DHAVE_CONFIG_H -I. -I. -I…/… -I…/include -I…/pix/components
-I…/pix/shortcuts -I/openqnx/qt-2.3.2/i
nclude -O2 -DNO_DEBUG -DNO_CHECK -D_OS_=QNX -fguiding-decls -Wno-switch
-Wp,-MD,.deps/CompIO.pp -c CompIO.cpp -fPIC -DPIC -o .libs/CompIO.lo

{standard input}: Assembler messages:
{standard input}:61466: Fatal error: Symbol use_facet__FRCQ23std6locale
already defined.
cc: /usr/ntox86/bin/as error 1

/usr/include/xlocale:
In method std::basic_filebuf<char,std::char_traits<char ::~basic_filebuf()': /usr/include/xlocale:509: output pipe has been closed cc: /usr/lib/gcc-lib/ntox86/2.95.2/cc1plus error 33 make[1]: *** [CompIO.lo] Error 1 make[1]: Leaving directory /openqnx/qtez-0.93.5/src/components’
make: *** [all-recursive] Error 1


cburgess@qnx.com

Armin Steinhoff <a-steinhoff@web_.de> wrote:


Colin Burgess wrote:

The problem seems to be introduced by the -fguiding-decls option,
which shouldn’t be used (note especially the last paragraph)

Yes it is the case … I have removed that option and all is working.

Now you believe I was kidding by calling him the master :slight_smile:

Frank