You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@stdcxx.apache.org by "Farid Zaripov (JIRA)" <ji...@apache.org> on 2008/02/20 19:29:43 UTC

[jira] Created: (STDCXX-737) Configure tests might be compiled twice.

Configure tests might be compiled twice.
----------------------------------------

                 Key: STDCXX-737
                 URL: https://issues.apache.org/jira/browse/STDCXX-737
             Project: C++ Standard Library
          Issue Type: Bug
          Components: Configuration
    Affects Versions: 4.2.0, 4.1.4, 4.1.3, 4.1.2
         Environment: unix
            Reporter: Farid Zaripov


>From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :

  I made this change in GNUmakefile because the
EXTERN_FUNCTION_TEMPLATE.cpp
config test has compiled twice on my gcc/Linux:

1) first it was not linked with extern_function_template_imp.o and due
to this
the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h

config.log:
---------
...
gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
extern_function_template_imp.o
gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
EXTERN_FUNCTION_TEMPLATE.o
gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
EXTERN_FUNCTION_TEMPLATE
EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
reference to `S<int> foobar<int>(S<int>)'
collect2: ld returned 1 exit status
...
---------

config.h:
---------
...
// #define _RWSTD_NO_extern_function_template_imp
#define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
...
---------

2) second it was linked with extern_function_template_imp.o and the
config.h contains the second entry, where
_RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented

config.log:
---------
...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
-Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
-Wcast-align  -c
/usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
EXTERN_FUNCTION_TEMPLATE.o
gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
-lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
./EXTERN_FUNCTION_TEMPLATE
...
---------

config.h:
---------
...
// #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
...
---------

  As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
while gcc supports the extern function templates.

  The first compilation is come from "%.o: %.cpp" rule, and the second -
from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-737:
-----------------------------------

    Assignee: Farid Zaripov  (was: Martin Sebor)

Reassigned to Farid.

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Farid Zaripov closed STDCXX-737.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2.1

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>             Fix For: 4.2.1
>
>          Time Spent: 5h
>  Remaining Estimate: 0h
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570909#action_12570909 ] 

Martin Sebor commented on STDCXX-737:
-------------------------------------

Here's the relevant output of the config step:
{noformat}
checking for instantiation before definition       ok
checking for explicit instantiation with implicit  no (_RWSTD_NO_EXPLICIT_INSTANTIATION_WITH_IMPLICIT_INCLUSION)
checking for explicit instantiation of members     ok
checking for explicit member specialization        ok
checking for exported templates                    no (_RWSTD_NO_EXPORT)
checking for the export keyword                    ok
checking for compatibility of extern "C" and "C++" ok
checking for exceptions from extern "C" functions  ok
checking overloading on extern "C"                 no (_RWSTD_NO_EXTERN_C_OVERLOAD)
checking for extern function template extension    no (_RWSTD_NO_EXTERN_FUNCTION_TEMPLATE)
{noformat}

The listing below distilled from {config.log} shows the order in which config tests (.cpp and .o) files get processed. The ones marked {{[E]}} indicate an error at the respective step (compilation for .cpp or linking for .o):
{noformat}
[E] IMPLICIT_INCLUSION.o
[E] EXTERN_FUNCTION_TEMPLATE.cpp
    EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp
[E] EXPLICIT_INSTANTIATION_WITH_IMPLICIT_INCLUSION.cpp
    EXPLICIT_MEMBER_INSTANTIATION.cpp
    EXPLICIT_MEMBER_SPECIALIZATION.cpp
    EXPORT_KEYWORD.cpp
[E] EXPORT.o
    EXTERN_C_COMPATIBILITY.cpp
    EXTERN_C_EXCEPTIONS.cpp
[E] EXTERN_C_OVERLOAD.cpp
    EXTERN_FUNCTION_TEMPLATE.cpp
{noformat}

What I suspect happens is that the processing starts with {{EXPLICIT_INSTANTIATION_BEFORE_DEFINITION.cpp}}. The test references the
{{_RWSTD_NO_IMPLICIT_INCLUSION}} and {{_RWSTD_NO_EXTERN_FUNCTION_TEMPLATE}} macros so the configuration recurses to process those tests first. First, {{IMPLICIT_INCLUSION.o}} fails to link because gcc doesn't support implicit inclusion and the macro gets appended to {{config.h}}. Next, {{EXTERN_FUNCTION_TEMPLATE}} is processed. It references the {{_RWSTD_NO_extern_function_template_imp}} macro, so the {{extern_function_template_imp.cpp}} must be compiled. The compilation is successful. Finally, {{EXTERN_FUNCTION_TEMPLATE.cpp}} must be built. The compilation is successful but the linking fails because, as Farid says, the link line is missing the {{extern_function_template_imp.o}} file:

{noformat}
gcc $CXXFLAGS -c $TOPDIR/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o EXTERN_FUNCTION_TEMPLATE.o
gcc EXTERN_FUNCTION_TEMPLATE.o -lsupc++ -o EXTERN_FUNCTION_TEMPLATE
EXTERN_FUNCTION_TEMPLATE.o: In function `main':
$TOPDIR/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined reference to `S<int> foobar<int>(S<int>)'
collect2: ld returned 1 exit status
{noformat}

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Martin Sebor
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor reassigned STDCXX-737:
-----------------------------------

    Assignee: Martin Sebor

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Martin Sebor
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571058#action_12571058 ] 

Farid Zaripov commented on STDCXX-737:
--------------------------------------

Fixed thus: http://svn.apache.org/viewvc?rev=629812&view=rev

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570925#action_12570925 ] 

Martin Sebor commented on STDCXX-737:
-------------------------------------

Okay, I think I've got it. The definition of the {{targets}} variable in [r627618|http://svn.apache.org/viewvc?view=rev&revision=627618] can't contain unquoted spaces:

{noformat}
+                      targets="$$fname.o $$fname run RUN=$$fname"      \
+                              "$(LOPT)=$$opts" ;                       \
{noformat}

What it does is try to invoke a command named {{LDOPTS=...}} (or whatever {{"$(LOPT)=$$opts"}} expands to. To fix it, leave out the closing and opening quotes, like so:

{noformat}
+                      targets="$$fname.o $$fname run RUN=$$fname      \
+                              $(LOPT)=$$opts" ;                       \
{noformat}


We really should rewrite the whole {{GNUMakefile.cfg}} as a plain shell script...

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Martin Sebor
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12570898#action_12570898 ] 

Martin Sebor commented on STDCXX-737:
-------------------------------------

I don't see the duplicate {{_RWSTD_NO_EXTERN_FUNCTION_TEMPLATE}} macro in a config.h generated for 4.2.0:

{noformat}
$ cat -n ../include/config.h | grep EXTERN_FUNCTION_TEMPLATE
   408  #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
{noformat}

but I do see two invocations of the compiler for the test:

{noformat}
$ cat -n ../include/config.log | grep EXTERN_FUNCTION_TEMPLATE
   791  gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  -c /home/sebor/stdcxx-4.2.0/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o EXTERN_FUNCTION_TEMPLATE.o
   792  /home/sebor/stdcxx-4.2.0/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:54: error: ISO C++ forbids the use of 'extern' on explicit instantiations
   832  gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long -Wcast-align  -c /home/sebor/stdcxx-4.2.0/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o EXTERN_FUNCTION_TEMPLATE.o
   833  /home/sebor/stdcxx-4.2.0/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:54: error: ISO C++ forbids the use of 'extern' on explicit instantiations
{noformat}

> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Martin Sebor
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (STDCXX-737) Configure tests might be compiled twice.

Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/STDCXX-737?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12571058#action_12571058 ] 

farid edited comment on STDCXX-737 at 2/21/08 6:55 AM:
---------------------------------------------------------------

Fixed thus: http://svn.apache.org/viewvc?rev=629812&view=rev
Merged in 4.2.x branch thus: http://svn.apache.org/viewvc?rev=629815view=rev


      was (Author: farid):
    Fixed thus: http://svn.apache.org/viewvc?rev=629812&view=rev
  
> Configure tests might be compiled twice.
> ----------------------------------------
>
>                 Key: STDCXX-737
>                 URL: https://issues.apache.org/jira/browse/STDCXX-737
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 4.1.2, 4.1.3, 4.1.4, 4.2.0
>         Environment: unix
>            Reporter: Farid Zaripov
>            Assignee: Farid Zaripov
>          Time Spent: 3h
>  Remaining Estimate: 0h
>
> From http://www.nabble.com/forum/Permalink.jtp?root=15579207&post=15593021&page=y :
>   I made this change in GNUmakefile because the
> EXTERN_FUNCTION_TEMPLATE.cpp
> config test has compiled twice on my gcc/Linux:
> 1) first it was not linked with extern_function_template_imp.o and due
> to this
> the macro _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE is defined in config.h
> config.log:
> ---------
> ...
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/extern_function_template_imp.cpp -o
> extern_function_template_imp.o
> gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread  -lm -lsupc++  -o
> EXTERN_FUNCTION_TEMPLATE
> EXTERN_FUNCTION_TEMPLATE.o(.text+0x26): In function `main':
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp:47: undefined
> reference to `S<int> foobar<int>(S<int>)'
> collect2: ld returned 1 exit status
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_extern_function_template_imp
> #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> 2) second it was linked with extern_function_template_imp.o and the
> config.h contains the second entry, where
> _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE define is commented
> config.log:
> ---------
> ...gcc -D_RWSTDDEBUG -pthread -I. -pedantic -nostdinc++ -g  -W -Wall
> -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long
> -Wcast-align  -c
> /usr/src/trunk/etc/config/src/EXTERN_FUNCTION_TEMPLATE.cpp -o
> EXTERN_FUNCTION_TEMPLATE.o
> gcc EXTERN_FUNCTION_TEMPLATE.o -pthread extern_function_template_imp.o
> -lm -lsupc++  -o EXTERN_FUNCTION_TEMPLATE
> ./EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
> config.h:
> ---------
> ...
> // #define _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE
> ...
> ---------
>   As a result the _RWSTD_NO_EXTERN_FUNCTION_TEMPLATE macro is defined
> while gcc supports the extern function templates.
>   The first compilation is come from "%.o: %.cpp" rule, and the second -
> from "config:" rule. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.