websevices

Compile WSO2 WSF/PHP บน FreeBSD

หลายคนคงเคยใช้ WSO2 Web Services Framework for PHP ( http://wso2.org/projects/wsf/php ) ซึ่งเป็น Framework ตัวนึงที่น่าใช้ทีเดียว ในการลงบน linux นั้น ไม่ใช่เรื่องยาก ไม่ว่าจะลงโดย binary หรือการ compile เอง แต่เนื่องจาก kernel ของ Freebsd และ Linux มีการเรียก IO ใช้ต่างกัน ในรายละเอียด ทำให้ library บางอย่างไม่มี เกิด compilation error ได้

  1. # wget <a href="http://builder.wso2.org/~wso2wsf/wso2-wsf-php-src-snapshot.tar.gz<br />
  2. #" title="http://builder.wso2.org/~wso2wsf/wso2-wsf-php-src-snapshot.tar.gz<br />
  3. #">http://builder.wso2.org/~wso2wsf/wso2-wsf-php-src-snapshot.tar.gz<br />
  4. #</a> tar zxvf wso2-wsf-php-src-snapshot.tar.gz
  5. # cd wso2-wsf-php-src-2.0.0
  6. # ./configure
  7. # make
  8. uuid_gen_unix.c: In function `axutil_uuid_get_mac_addr':
  9. uuid_gen_unix.c:337: error: `SIOCGARP' undeclared (first use in this function)
  10. uuid_gen_unix.c:337: error: (Each undeclared identifier is reported only once
  11. uuid_gen_unix.c:337: error: for each function it appears in.)
  12. *** Error code 1

หาใน google มีคนเจอเหมือนกัน แต่ไม่ได้อยู่ดี เอาเป็นว่าลบทิ้งเลยละกันบรรทัดนั้น -_-''

  1. memcpy(&(sa->sin_addr), *(he->h_addr_list), sizeof(struct in_addr));
  2. /* คอมเมนต์ซะ
  3. if (ioctl(s, SIOCGARP, &ar) < 0)
  4. {
  5. close(s);
  6. return NULL;
  7. }
  8. */
  9. close(s);
  10. if (!(ar.arp_flags & ATF_COM))
  11. return NULL;

  1. # make

อีกอัน เหมือน ftime() ไม่มี ต้องลง libcompat

  1. # cd /usr/ports/misc/compat5x
  2. # make install clean