You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@apr.apache.org by bu...@apache.org on 2007/05/30 11:39:09 UTC

DO NOT REPLY [Bug 42545] New: - apr redefines compiler-internal __attribute__

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545

           Summary: apr redefines compiler-internal __attribute__
           Product: APR
           Version: 1.2.8
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: major
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: apaku@gmx.de


Hi,

I didn't get any responses at the dev mailinglist so I'm filing this as bug:

after a long journey and with the help of a kind soul I found that apr.h
contains an error which makes apr unusable with mingw. The problem is
line #59 in apr.h.in, that line redefines __attribute__(__x) to nothing,
however mingw uses __attribute__(__stdcall) when declaring a function
with __stdcall. This creates a problem when trying to link with the apr
library, because the import library contains the wrong symbols, in
particular it has _apr_foo and __im__?apr_foo@@...

Removing that define one can create a proper import library for apr from
the MSVC dll and the .def file by following the instructions found on
http://www.mingw.org/MinGWiki/index.php/MSVC-MinGW-DLL

I don't understand why apr redefines a compiler-internal symbol like 
__attribute__.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From apaku@gmx.de  2007-06-05 13:49 -------
Ok, I tried and it works perfectly fine. I rebuilt only apr itself using MSVC 
and with the steps explained on the MinGW page I could produce an import 
library for mingw and build my application :)

Thanks for the help on this.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From wrowe@apache.org  2007-05-31 12:13 -------
Joe - it was apr.hw that initially defined it.  The apr_private.h was actually
redundant - apr.h was included first, AFAICT.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From wrowe@apache.org  2007-05-31 14:52 -------
The 0.9 and 1.2 releases I'm rolling today, but there is no need to wait - and
if you can help on this,

http://svn.apache.org/viewvc?view=rev&rev=543219

is the patch you can apply and confirm that all is now well.  Sooner the better,
since I'll be rolling within an hour or few.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From apaku@gmx.de  2007-05-30 12:38 -------
I'm not that familiar with internals of gcc/mingw, but I do know that it 
supports __stdcall. However AFAIK it internally makes __attribute__(__stdcall) 
from that and seemingly at a place that is affected by redefinition.

So in short 1) sounds good and 2) is not necessary, the whole of KDE uses 
__declspec and as I said just removing the redefinition of __attribute__ makes 
__stdcall also work properly.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From apaku@gmx.de  2007-05-31 15:12 -------
Wow, thats really great (I expected an answer like the next release after the 
upcoming ones) :)

Unfortuantely I can't help you check that, because I'm still rebuilding kdelibs 
and I don't have a test program at hand (I didn't find this out myself and the 
developer who does have the test program is not available atm). The rebuild 
will run for another 2 hours or so and only after that I can check wether 
kdevelop which uses the apr libs builds.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From wrowe@apache.org  2007-05-30 12:25 -------
It is redefined because it does conflict on some compilers.

However, it's a double-edged issue.  1 - we can remove it contingent on the
compiler being GCC.  That's cool.

2 - if the syntax in gcc is __attribute__(__stdcall), then we really should
look at making gcc-specific DECLARE_* family macros using __attribute__ rather
than __declspec, unless you know gcc is happy with both?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545





------- Additional Comments From apaku@gmx.de  2007-05-31 14:49 -------
Thanks, which would be the next release that includes this fix?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545


jorton@redhat.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO




------- Additional Comments From jorton@redhat.com  2007-05-31 02:58 -------
The section in apr.h which undefines __attribute__ is only supposed to take
effect for non-GCC, pre-GCC 2.7 compilers.  Isn't that working?  It's all for
NeXT systems which APR probably doesn't really work on anyway, so it could just
as well be nuked for the time being.

Or is it really the arch/win32/apr_private.h #define-to-nothing of __attribute__
which is the problem? 

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


DO NOT REPLY [Bug 42545] - apr redefines compiler-internal __attribute__

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=42545>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=42545


wrowe@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|                            |FIXED




------- Additional Comments From wrowe@apache.org  2007-05-31 14:39 -------
Fix committed, thanks for the report

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org