You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Rush Manbert (JIRA)" <ji...@apache.org> on 2008/11/25 00:09:44 UTC

[jira] Created: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
---------------------------------------------------------------------

                 Key: THRIFT-214
                 URL: https://issues.apache.org/jira/browse/THRIFT-214
             Project: Thrift
          Issue Type: Bug
          Components: Library (C++)
         Environment: Mac Os X 10.5 compiling for 64 bit
            Reporter: Rush Manbert


We are building quad libraries for the Mac. (32/64 bit PPC/Intel)

Project was configure this way:
CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
CPPFLAGS: 
CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 

CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug


The compile command line and error output is:
 g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision


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


[jira] Updated: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

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

Rush Manbert updated THRIFT-214:
--------------------------------

    Attachment:     (was: patch.txt)

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "Rush Manbert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650433#action_12650433 ] 

Rush Manbert commented on THRIFT-214:
-------------------------------------

That is fairly annoying, isn't it?

I made the patch and will attach. Somehow in a long career I have managed to only do this once or twice. I hope the format is what you're looking for. (diff --unified)

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Updated: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

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

Rush Manbert updated THRIFT-214:
--------------------------------

    Attachment: patch.txt

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650384#action_12650384 ] 

David Reiss commented on THRIFT-214:
------------------------------------

What g++ version are you using?  I'm confused as to why this doesn't happen on FreeBSD, which also uses a pointer type for pthread_t.

Unfortunately, we cannot use a reinterpret cast here because Linux uses an integer type for pthread_t and reinterpret_cast cannot be used for casting between integer types, even if they are the exact same type, as they are in this case.  I thought that a C-style cast would work in all cases based on <http://www.open-std.org/jtc1/sc22/open/n2356/expr.html#expr.cast>, but I guess not.  I don't really understand how the cast in this case can be "interpreted" as a static_cast or const_cast, but I guess that what is going on, otherwise the compiler should try to treat it as a reinterpret_cast.  Do you know what type _opaque_pthread_t is?

I had a plan to create a templated function that would reinterpret_cast pointers but static_cast integers.  I guess I'll have to do it after all.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749384#action_12749384 ] 

David Reiss commented on THRIFT-214:
------------------------------------

This was committed.  If you hit the "all" tab in JIRA, it will show you the svn commit.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Updated: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

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

Rush Manbert updated THRIFT-214:
--------------------------------

    Attachment: patch.txt

Here's the patch.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650429#action_12650429 ] 

David Reiss commented on THRIFT-214:
------------------------------------

I would have hoped that it would have used the class-local type first, but oh well.  Yeah, please upload a new patch (preferably as a unified diff with the path and file name to make it easier to apply).

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "Rush Manbert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650424#action_12650424 ] 

Rush Manbert commented on THRIFT-214:
-------------------------------------

My compiler version:
i686-apple-darwin9-g++-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5484)

I traced down the return types and typedefs and pthread_t is just a 64 bit pointer to a structure.

So this didn't make sense, but I made a test project and defined this:
typedef uint64_t id_t;

and when I built, I got this error:
/Developer/SDKs/MacOSX10.5.sdk/usr/include/sys/wait.h:95: error: 'id_t' has a previous declaration as 'typedef __darwin_id_t id_t'
which resolves to a uint32_t.

I think this is what's causing the error, and if I change line 273 of PosixThreadFactory.cpp to this:
    return (Thread::id_t)pthread_self();

it works. So it seems that the real change is to make sure the correct type gets used.

Sorry for the earlier info. Someone else actually ran into this and fixed it as the original patch shows. They asked me to submit it because I'm the "thrift liaison" guy here.

If this looks correct to you, do you want a patch?

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "Rush Manbert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650441#action_12650441 ] 

Rush Manbert commented on THRIFT-214:
-------------------------------------

Everything looks good. The library builds. All our apps that use it run and all the regression tests pass.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Resolved: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

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

David Reiss resolved THRIFT-214.
--------------------------------

    Resolution: Fixed

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "Chris Goffinet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749371#action_12749371 ] 

Chris Goffinet commented on THRIFT-214:
---------------------------------------

Can we get this committed? I just installed a fresh copy of Snow Leopard, and it seems by default its compiling in 64-bit. I applied the patch and it builds fine.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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


[jira] Commented: (THRIFT-214) PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5

Posted by "David Reiss (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12650434#action_12650434 ] 

David Reiss commented on THRIFT-214:
------------------------------------

Yep.  This is what I was looking for.  If this version works for you, I can commit it.

> PosixThreadFactory.cpp fails 64 bit compile with gcc on Mac OS X 10.5
> ---------------------------------------------------------------------
>
>                 Key: THRIFT-214
>                 URL: https://issues.apache.org/jira/browse/THRIFT-214
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>         Environment: Mac Os X 10.5 compiling for 64 bit
>            Reporter: Rush Manbert
>         Attachments: patch.txt
>
>
> We are building quad libraries for the Mac. (32/64 bit PPC/Intel)
> Project was configure this way:
> CFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576
> CPPFLAGS: 
> CXXFLAGS: -g  -O0  -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden
> LDFLAGS:  -syslibroot,/Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64  -Wl,-dead_strip -no_dead_strip_inits_and_terms -Wl,-search_paths_first 
> CONFIGURE_OPTIONS: --without-java --without-py --without-ruby --with-boost=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost --with-zlib=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/zlib/Debug --with-libevent=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/libevent/Debug --disable-dependency-tracking --enable-static --disable-shared --enable-debug --prefix=/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/thrift/Debug
> The compile command line and error output is:
>  g++ -DHAVE_CONFIG_H -I. -I../.. -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/SUBSYS_TOP/thirdPartyLibs/installedMac/individual/boost/include -I/Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src -Wall -g -O0 -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 -arch i386 -arch x86_64 -arch ppc -arch ppc64 -fvisibility=hidden -DYYLMAX=1048576 -fvisibility-inlines-hidden -c /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp -o PosixThreadFactory.o
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp: In member function 'uint64_t facebook::thrift::concurrency::PosixThreadFactory::Impl::getCurrentThreadId() const':
> /Users/rmanbert/development/trunkHead/client/thirdPartyLibs/sources/thrift/lib/cpp/src/concurrency/PosixThreadFactory.cpp:273: error: cast from '_opaque_pthread_t*' to 'id_t' loses precision

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