HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Change
  • Wiki History
  • Next Change →

Changes between Version 45 and Version 46 of CommonProblems


Ignore:
Timestamp:
08/09/10 22:50:05 (5 years ago)
Author:
michaelvoliveira
Comment:

Tottaly Redone

Legend:

Unmodified
Added
Removed
Modified
  • CommonProblems

    v45 v46  
    55Information about BeOS's POSIX compatibility, see [wiki:BeOSPosix]. 
    66 
    7 === No /usr === 
     7== Main UNIX differences == 
    88 
    9 Just like BeOS, Haiku does not have /usr. 
    10 Attempts to install things to {{{/usr}}} will usually fail and leave empty folders, because rootfs only allows creating directories, not regular files. 
     9 * No {{{/usr}}}: Just like BeOS, Haiku does not have /usr. Attempts to install things to {{{/usr}}} will usually fail and leave empty folders, because rootfs only allows creating directories, not regular files. The proper fix is to use {{{--prefix=/boot/common}}} in {{{./configure}}} command for libraries and {{{--prefix=/boot/apps/yourapphere}}} for applications. 
    1110 
    12 A quick hack is to create a usr somewhere and symlink to {{{/usr}}}, but it is discouraged. 
     11 * No {{{-lm}}} was encountered: The {{{-lm}}} refers to libm which isn't needed for Haiku or BeOS. As the math library is part of libroot, is linked by default, implicitly. If the port is using the autotools chances are this can be fixed by doing an {{{AC_CHECK_LIB}}} for {{{cos}}} in {{{m}}} and then setting a variable such as {{{LIBM}}} or {{{MLIB}}} to by {{{="-lm"}}} if true or {{{=""}}} if not. Here is some explanation: [http://www.freelists.org/archives/haiku-development/04-2008/msg00904.html] 
    1312 
    14 The proper fix is to use {{{--prefix=/boot/common}}} (or make sure it defaults to {{{/boot/common}}} for Haiku). 
     13 * No {{{-lc}}} was encountered: This sometimes turns up, and I think it is due to the port using an older libtool. Try running {{{libtoolize --force --copy --install}}}, {{{aclocal}}}, {{{autoconf}}} and {{{automake}}} before {{{./configure}}} to see if that clears it up. 
    1514 
    16 === No undefined ref in shared libs === 
    17  
    18 ports: [wiki:dev-util/subversion], [wiki:dev-libs/apr] 
    19  
    20 You need to pass the {{{-no-undefined}}} option to libtool 
    21  
    22 Alternatively, libtool can be patched to always exhibit this behavior, at the risk of breaking static compilation when dynamic linking fails. -- andreasf 
    23  
    24 === stat struct without 'st_blocks' (Fixed) === 
    25  
    26 ports: [wiki:app-arch/tar] (make check), [wiki:net-fs/samba], [wiki:dev-util/cvs] 
    27  
    28 The stat struct in sys/stat.h in BeOS ~~and Haiku~~ ([http://dev.haiku-os.org/ticket/2261 Haiku now has it] [http://dev.haiku-os.org/changeset/27791 as seen here]) doesn't have an st_blocks member. In projects with autoconf, you can check for HAVE_STAT_ST_BLOCKS. 
    29  
    30 http://lists.samba.org/archive/samba-technical/2005-January/039275.html 
    31  
    32 === No -lm was encountered === 
    33  
    34 ports: [wiki:dev-lang/lua], others 
    35  
    36 The -lm refers to libm which isn't needed for Haiku or BeOS as the math library is part of libroot and linked by default 
    37  
    38 Please DO NOT create a shortcut of libroot.so and rename to libm.so on gcc4 and gcc2 lib directory (Haiku hybrids case) or change the -lm references in the configure file to -lroot. 
    39 If the port is using the autotools chances are this can be fixed by doing an AC_CHECK_LIB for cos in m and then setting a variable such as LIBM or MLIB to by ="-lm" if true or "" if not. 
    40  
    41 Here is some explanation: 
    42 http://www.freelists.org/archives/haiku-development/04-2008/msg00904.html 
    43  
    44 === No -lc was encountered === 
    45  
    46 This sometimes turns up, and I think it is due to the port using an older libtool.  Try running libtoolize --force --copy --install, aclocal, autoconf and automake before ./configure to see if that clears it up. 
    47  
    48 === Conflicting types for 'restrict' (Fixed) === 
    49  
    50 /boot/develop/headers/posix/search.h:35: conflicting types for `restrict' 
    51 /boot/develop/headers/posix/search.h:35: previous declaration of `restrict' 
    52 This seems to be an issue with Haiku and has been reported [http://dev.haiku-os.org/ticket/2262 Haiku-2262] 
    53 This has been fixed in Haiku.  If using a version  prior to the fix you can copy the search.h file over the one in your headers/posix folder. 
    54  
    55 === GCC 2.9 related build problems === 
    56  
    57 output_operand_lossage `invalid expression as operand' 
    58  
    59 This can be avoided by not passing the '-g' option to gcc for this test. 
    60  
    61  
    62 === GCC 4.3 related build problems === 
    63  
    64 Typical errors look like these: 
    65  
    66 error: 'find' is not a member of 'std' 
    67  
    68 error: 'exit' was not declared in this scope 
    69  
    70 Please take a look at: http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include 
    71  
    72 or 
    73  
    74 http://www.comp.leeds.ac.uk/hannah/cpp/errors.html 
    75  
    76 === MSG_NOSIGNAL undeclared === 
    77  
    78 Add below to header/source file. 
    79  
    80 {{{ 
    81 #ifndef MSG_NOSIGNAL  
    82 #define MSG_NOSIGNAL 0  
    83 #endif 
    84 }}} 
    85  
    86 === FNDELAY undeclared === 
    87  
    88 Add below to header/source file. 
    89  
    90 {{{ 
    91 #ifndef FNDELAY 
    92 #define FNDELAY O_NONBLOCK  
    93 #endif 
    94 }}} 
    95  
    96 === O_NOATIME undeclared === 
    97  
    98 Add below to header/source file. 
    99  
    100 {{{ 
    101 #include <fcntl.h> 
    102 #ifndef _GNU_SOURCE 
    103 #define _GNU_SOURCE // for O_NOATIME 
    104 #define O_NOATIME 01000000 
    105 #endif 
    106 }}} 
    107  
    108  
    109 === stdbool.in.h (Now fixed in Haiku) === 
    110  
    111 This has been fixed: http://ports.haiku-files.org/wiki/dev-libs/gnulib 
    112 So any releases posted AFTER May 25, 2008 'should' include an updated stdbool.in.h 
    113  
    114 === iconv (Now fixed in Haiku)) === 
    115  
    116 Iconv is included in Haiku, but many times ./configure does not detect and use it.  This is because it is in libtextencoding.so ([http://dev.haiku-os.org/ticket/2294 should be fixed now]).  So try adding a check for iconv in libtextextencoding and see if that works. 
    117  
    118 === Cannot find socket libraries === 
    119  
    120 The socket functionalities are provided in Haiku's libnetwork.  The proper fix for this is to patch Configure to check that library as well. This is an example patch of libevent. 
     15 * No {{{socket}}} or {{{connection}}} function was encountered: The socket and connection functionalities are provided in Haiku's {{{libnetwork}}}. The proper fix for this is to patch the {{{configure}}} file to check that library as well. This is an example patch of libevent: 
    12116{{{ 
    12217diff -Naur libevent-1.4.13-stable/configure.in libevent-1.4.13-stable-haiku/configure.in 
    … …  
    13429}}} 
    13530 
    136 Also note BeOS (BONE) needs {{{libsocket}}} and {{{libbind}}} instead. 
     31 * Also note BeOS (BONE) needs {{{libsocket}}} and {{{libbind}}} instead. 
    13732 
    138 Also, Both libbind (on BeOS) and libnetwork (on Haiku) have some usual symbols mangled with a prepended underscore (or 2), so typically a test for {{{inet_aton}}} like above changed to {{{AC_SEARCH_LIBS(inet_aton, resolv bind)}}} will fail to find {{{libbind}}} (which exports it as {{{__inet_aton}}}). 
    139 This is because headers use preprocessor defines to make {{{inet_aton()}}} available, and the linking checks done by autoconf does not include the proper headers. 
    140 This can be fixed by checking for another (unmangled) symbol like {{{gethostbyname2}}}. 
    141 The cleanest checks for the above patch would then be: 
     33 * Also, both {{{libbind}}} (on BeOS) and {{{libnetwork}}} (on Haiku) have some usual symbols mangled with a prepended underscore (or 2), so typically a test for {{{inet_aton}}} like above changed to {{{AC_SEARCH_LIBS(inet_aton, resolv bind)}}} will fail to find {{{libbind}}} (which exports it as {{{__inet_aton}}}). 
    14234 
     35 * This is because headers use preprocessor defines to make {{{inet_aton()}}} available, and the linking checks done by {{{autoconf}}} does not include the proper headers. This can be fixed by checking for another (unmangled) symbol like {{{gethostbyname2}}}. The cleanest checks for the above patch would then be: 
    14336{{{ 
    14437diff -Naur libevent-1.4.13-stable/configure.in libevent-1.4.13-stable-haiku/configure.in 
    … …  
    15750}}} 
    15851 
    159 You will want to contact the project to ask for guidance here though, as it might impact other platforms. 
    160 Also don't forget to fix the use of the HAVE_FOO macros in the code. 
     52 * You will want to contact the project to ask for guidance here though, as it might impact other platforms. Also don't forget to fix the use of the {{{HAVE_FOO}}} macros in the code. 
    16153 
    162 Actually, it seems Haiku provides {{{inet_ntoa()}}} as a weak alias for {{{__inet_ntoa}}}, (plus libnetwork is also checked for for socket(), though some applications won't use the tested symbols if the tested libraries are not there... which is why AC_SEARCH_LIBS is better than AC_CHECK_LIBS, as it first checks if the symbol is available already). 
     54 * Actually, it seems Haiku provides {{{inet_ntoa()}}} as a weak alias for {{{__inet_ntoa}}}, (plus libnetwork is also checked for for {{{socket()}}}, though some applications won't use the tested symbols if the tested libraries are not there... which is why {{{AC_SEARCH_LIBS}}} is better than {{{AC_CHECK_LIBS}}}, as it first checks if the symbol is available already). 
    16355 
    164 === Missing syslog() === 
     56== Missing functions == 
    16557 
    166 On BeOS, syslog() is in libbe, so one must AC_SEARCH_LIBS(syslog, be). 
    167 It's in libroot on Haiku so it shouldn't need any check. 
     58 * {{{MSG_NOSIGNAL}}} undeclared: Add the following code into header/source file. 
     59{{{ 
     60#ifndef MSG_NOSIGNAL  
     61#define MSG_NOSIGNAL 0  
     62#endif 
     63}}} 
    16864 
    169 === DT_DIR undeclared === 
     65 * {{{FNDELAY}}} undeclared: Add the following code into header/source file. 
     66{{{ 
     67#ifndef FNDELAY 
     68#define FNDELAY O_NONBLOCK  
     69#endif 
     70}}} 
    17071 
    171 The use of DT_DIR doesn't work on non-ext* filesystems 
     72 * {{{O_NOATIME}}} undeclared: Add the following code into header/source file. 
     73{{{ 
     74#include <fcntl.h> 
     75#ifndef _GNU_SOURCE 
     76#define _GNU_SOURCE // for O_NOATIME 
     77#define O_NOATIME 01000000 
     78#endif 
     79}}} 
    17280 
    173 So replace for 
    174  
     81 * {{{DT_DIR}}} undeclared: The use of {{{DT_DIR}}} doesn't work on non-ext* filesystems. So replace for 
    17582{{{ 
    17683#ifndef DT_DIR 
    … …  
    200107} 
    201108#endif 
     109 
     110//And after, add a check function 
     111info.dir = !! is_dir (path, de->d_name); 
    202112}}} 
    203113 
    204 And after a check function 
     114== Compile time problems == 
    205115 
     116 * No {{{undefined references}}} allowed in i586-pc-beos shared libraries: found in [wiki:dev-util/subversion] and [wiki:dev-libs/apr] ports. You need to pass the {{{-no-undefined}}} option to {{{libtool}}}. Alternatively, {{{libtool}}} can be patched to always exhibit this behavior, '''"at the risk of breaking static compilation when dynamic linking fails".'''''''''' -- andreasf''' 
     117 
     118== GCC 2 build problems == 
     119 
     120 * {{{output_operand_lossage `invalid expression as operand'}}}: This can be avoided by not passing the {{{-g}}} option to gcc for this test. 
     121 
     122== GCC 4 build problems == 
     123 
     124 * Typical errors look like these: 
    206125{{{ 
    207 info.dir = !! is_dir (path, de->d_name); 
     126error: 'find' is not a member of 'std' 
     127 
     128error: 'exit' was not declared in this scope 
    208129}}} 
     130 
     131 * Please take a look at: [http://www.cyrius.com/journal/2007/05/10#gcc-4.3-include] and [http://www.comp.leeds.ac.uk/hannah/cpp/errors.html] 
     132 
     133 
     134== Haiku fixed problems == 
     135 
     136 * (stat) structure has no member {{{'st_blocks'}}}: found in [wiki:app-arch/tar] (make check), [wiki:net-fs/samba] and [wiki:dev-util/cvs] ports. The stat struct in {{{sys/stat.h}}} in BeOS '''''and Haiku''''' ([http://dev.haiku-os.org/ticket/2261] Haiku now has it, [http://dev.haiku-os.org/changeset/27791] as seen here) doesn't have an {{{st_blocks}}} member. In projects with {{{autoconf}}}, you can check for {{{HAVE_STAT_ST_BLOCKS}}}. Please check [http://lists.samba.org/archive/samba-technical/2005-January/039275.html] for more information. 
     137 
     138 * {{{stdbool.in.h}}}: [http://ports.haiku-files.org/wiki/dev-libs/gnulib]. So any releases posted '''AFTER''' May 25, 2008 'should' include an updated {{{stdbool.in.h}}} 
     139 
     140 * iconv: Iconv is included in Haiku, but many times {{{./configure}}} does not detect and use it.  This is because it is in {{{libtextencoding.so}}} ([http://dev.haiku-os.org/ticket/2294 should be fixed now]). So try adding a check for iconv in {{{-ltextextencoding}}} and see if that works. 
     141 
     142 * Conflicting types for {{{'restrict'}}}: 
     143{{{ 
     144/boot/develop/headers/posix/search.h:35: conflicting types for `restrict' 
     145/boot/develop/headers/posix/search.h:35: previous declaration of `restrict' 
     146}}} 
     147 * This seems to be an issue with Haiku and has been reported [http://dev.haiku-os.org/ticket/2262 Haiku-2262]. This has been fixed in Haiku.  If using a version prior to the fix you can copy the {{{search.h}}} file over the one in your headers/posix folder. 
     148 
     149 * Missing {{{syslog()}}}: On BeOS, {{{syslog()}}} is in libbe, so one must {{{AC_SEARCH_LIBS(syslog, be)}}}. It's in {{{libroot}}} on Haiku so it shouldn't need any check. 
     150 
     151 

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/