You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mike Nadeau (JIRA)" <ji...@apache.org> on 2010/10/13 18:52:45 UTC

[jira] Created: (THRIFT-954) PHP extension not compiling under FreeBSD

PHP extension not compiling under FreeBSD
-----------------------------------------

                 Key: THRIFT-954
                 URL: https://issues.apache.org/jira/browse/THRIFT-954
             Project: Thrift
          Issue Type: Bug
          Components: PHP - Library
    Affects Versions: 0.5, 0.4
         Environment: FreeBSD 7.2-RELEASE amd64
            Reporter: Mike Nadeau
            Priority: Minor
             Fix For: 0.6, 0.7, 0.5


When trying to compile the Thrift 0.4 / 0.5 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 

php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope

Here's the changes that allowed me to successfully compile it :

php_thrift_protocol.cpp:

#include <sys/types.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/endian.h> // <-- was endian.h
// #include <byteswap.h> // <-- doesn't exist under FreeBSD
#include <stdexcept>

#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htonll(x) bswap64(x) // <-- was bswap_64
#define ntohll(x) bswap64(x) // <-- was bswap_64
#else
#define htonll(x) x
#define ntohll(x) x
#endif

The lines that changed are the ones marked with "<--".

Please let me know if there's a better way to achieve this.

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


[jira] Updated: (THRIFT-954) PHP extension not compiling under FreeBSD

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

Mike Nadeau updated THRIFT-954:
-------------------------------

    Attachment: diff.txt

Here's the output of 'diff' between the original cpp file and my fixed file.



> PHP extension not compiling under FreeBSD
> -----------------------------------------
>
>                 Key: THRIFT-954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-954
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.4, 0.5
>         Environment: FreeBSD 7.2-RELEASE amd64
>            Reporter: Mike Nadeau
>            Priority: Minor
>             Fix For: 0.5, 0.6, 0.7
>
>         Attachments: diff.txt
>
>
> When trying to compile the Thrift 0.4 / 0.5 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 
> php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
> php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
> php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
> php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope
> Here's the changes that allowed me to successfully compile it :
> php_thrift_protocol.cpp:
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <unistd.h>
> #include <sys/endian.h> // <-- was endian.h
> // #include <byteswap.h> // <-- doesn't exist under FreeBSD
> #include <stdexcept>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> #define htonll(x) bswap64(x) // <-- was bswap_64
> #define ntohll(x) bswap64(x) // <-- was bswap_64
> #else
> #define htonll(x) x
> #define ntohll(x) x
> #endif
> The lines that changed are the ones marked with "<--".
> Please let me know if there's a better way to achieve this.

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


[jira] Commented: (THRIFT-954) PHP extension not compiling under FreeBSD

Posted by "Mike Nadeau (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920681#action_12920681 ] 

Mike Nadeau commented on THRIFT-954:
------------------------------------

After verification it seems the issue only affects Thrift 0.4... Thrift 0.5 has the required fixes to compile successfully under FreeBSD. I removed the 0.5+ mentions in the issue description.

> PHP extension not compiling under FreeBSD
> -----------------------------------------
>
>                 Key: THRIFT-954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-954
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.4
>         Environment: FreeBSD 7.2-RELEASE amd64
>            Reporter: Mike Nadeau
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: diff.txt
>
>
> When trying to compile the Thrift 0.4 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 
> php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
> php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
> php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
> php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope
> Here's the changes that allowed me to successfully compile it :
> php_thrift_protocol.cpp:
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <unistd.h>
> #include <sys/endian.h> // <-- was endian.h
> // #include <byteswap.h> // <-- doesn't exist under FreeBSD
> #include <stdexcept>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> #define htonll(x) bswap64(x) // <-- was bswap_64
> #define ntohll(x) bswap64(x) // <-- was bswap_64
> #else
> #define htonll(x) x
> #define ntohll(x) x
> #endif
> The lines that changed are the ones marked with "<--".
> Please let me know if there's a better way to achieve this.

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


[jira] Commented: (THRIFT-954) PHP extension not compiling under FreeBSD

Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12920688#action_12920688 ] 

Bryan Duxbury commented on THRIFT-954:
--------------------------------------

My preference would be to close this issue "wont fix" then - I'm not currently planning to release an 0.4.1 or whatever.

> PHP extension not compiling under FreeBSD
> -----------------------------------------
>
>                 Key: THRIFT-954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-954
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.4
>         Environment: FreeBSD 7.2-RELEASE amd64
>            Reporter: Mike Nadeau
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: diff.txt
>
>
> When trying to compile the Thrift 0.4 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 
> php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
> php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
> php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
> php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope
> Here's the changes that allowed me to successfully compile it :
> php_thrift_protocol.cpp:
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <unistd.h>
> #include <sys/endian.h> // <-- was endian.h
> // #include <byteswap.h> // <-- doesn't exist under FreeBSD
> #include <stdexcept>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> #define htonll(x) bswap64(x) // <-- was bswap_64
> #define ntohll(x) bswap64(x) // <-- was bswap_64
> #else
> #define htonll(x) x
> #define ntohll(x) x
> #endif
> The lines that changed are the ones marked with "<--".
> Please let me know if there's a better way to achieve this.

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


[jira] Closed: (THRIFT-954) PHP extension not compiling under FreeBSD

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

Mike Nadeau closed THRIFT-954.
------------------------------

    Resolution: Won't Fix

The problem was fixed in 0.5 and there won't be any 0.4.1, so we're all set with this.

> PHP extension not compiling under FreeBSD
> -----------------------------------------
>
>                 Key: THRIFT-954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-954
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.4
>         Environment: FreeBSD 7.2-RELEASE amd64
>            Reporter: Mike Nadeau
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: diff.txt
>
>
> When trying to compile the Thrift 0.4 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 
> php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
> php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
> php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
> php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope
> Here's the changes that allowed me to successfully compile it :
> php_thrift_protocol.cpp:
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <unistd.h>
> #include <sys/endian.h> // <-- was endian.h
> // #include <byteswap.h> // <-- doesn't exist under FreeBSD
> #include <stdexcept>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> #define htonll(x) bswap64(x) // <-- was bswap_64
> #define ntohll(x) bswap64(x) // <-- was bswap_64
> #else
> #define htonll(x) x
> #define ntohll(x) x
> #endif
> The lines that changed are the ones marked with "<--".
> Please let me know if there's a better way to achieve this.

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


[jira] Updated: (THRIFT-954) PHP extension not compiling under FreeBSD

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

Mike Nadeau updated THRIFT-954:
-------------------------------

        Fix Version/s:     (was: 0.7)
                           (was: 0.6)
                           (was: 0.5)
                       0.4
          Description: 
When trying to compile the Thrift 0.4 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 

php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope

Here's the changes that allowed me to successfully compile it :

php_thrift_protocol.cpp:

#include <sys/types.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/endian.h> // <-- was endian.h
// #include <byteswap.h> // <-- doesn't exist under FreeBSD
#include <stdexcept>

#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htonll(x) bswap64(x) // <-- was bswap_64
#define ntohll(x) bswap64(x) // <-- was bswap_64
#else
#define htonll(x) x
#define ntohll(x) x
#endif

The lines that changed are the ones marked with "<--".

Please let me know if there's a better way to achieve this.

  was:
When trying to compile the Thrift 0.4 / 0.5 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 

php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope

Here's the changes that allowed me to successfully compile it :

php_thrift_protocol.cpp:

#include <sys/types.h>
#include <netinet/in.h>
#include <unistd.h>
#include <sys/endian.h> // <-- was endian.h
// #include <byteswap.h> // <-- doesn't exist under FreeBSD
#include <stdexcept>

#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htonll(x) bswap64(x) // <-- was bswap_64
#define ntohll(x) bswap64(x) // <-- was bswap_64
#else
#define htonll(x) x
#define ntohll(x) x
#endif

The lines that changed are the ones marked with "<--".

Please let me know if there's a better way to achieve this.

    Affects Version/s:     (was: 0.5)

> PHP extension not compiling under FreeBSD
> -----------------------------------------
>
>                 Key: THRIFT-954
>                 URL: https://issues.apache.org/jira/browse/THRIFT-954
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.4
>         Environment: FreeBSD 7.2-RELEASE amd64
>            Reporter: Mike Nadeau
>            Priority: Minor
>             Fix For: 0.4
>
>         Attachments: diff.txt
>
>
> When trying to compile the Thrift 0.4 PHP extension under FreeBSD 7.2-RELEASE amd64, I faced these errors when running 'make' : 
> php_thrift_protocol.cpp:27:20: error: endian.h: No such file or directory
> php_thrift_protocol.cpp:28:22: error: byteswap.h: No such file or directory
> php_thrift_protocol.cpp:466: error: 'bswap_64' was not declared in this scope
> php_thrift_protocol.cpp:474: error: 'bswap_64' was not declared in this scope
> Here's the changes that allowed me to successfully compile it :
> php_thrift_protocol.cpp:
> #include <sys/types.h>
> #include <netinet/in.h>
> #include <unistd.h>
> #include <sys/endian.h> // <-- was endian.h
> // #include <byteswap.h> // <-- doesn't exist under FreeBSD
> #include <stdexcept>
> #if __BYTE_ORDER == __LITTLE_ENDIAN
> #define htonll(x) bswap64(x) // <-- was bswap_64
> #define ntohll(x) bswap64(x) // <-- was bswap_64
> #else
> #define htonll(x) x
> #define ntohll(x) x
> #endif
> The lines that changed are the ones marked with "<--".
> Please let me know if there's a better way to achieve this.

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