guile build fails: warning: implicit declaration of function 'open64'
Reported by: |
marco.bucci@… |
Owned by: |
macports-tickets@… |
Priority:
|
Normal
|
Milestone:
|
|
Component:
|
ports
|
Version:
|
1.5.2
|
Keywords:
|
guile
|
Cc:
|
mww@…
|
Port:
|
|
|
|
sudo port install teXmacs
Password:
---> Fetching guile
---> Verifying checksum(s) for guile
---> Extracting guile
---> Applying patches to guile
---> Configuring guile
---> Building guile with target all
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_lang_guile/work/guile-1.8.3" && make all " returned error 2
Command output: gcc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -I/opt/local/include -D_THREAD_SAFE -O2 -Wall -Wmissing-prototypes -Werror -MT libguile_la-fports.lo -MD -MP -MF .deps/libguile_la-fports.Tpo -c fports.c -fno-common -DPIC -o .libs/libguile_la-fports.o
cc1: warnings being treated as errors
fports.c: In function 'scm_open_file':
fports.c:364: warning: implicit declaration of function 'open64'
fports.c: At top level:
fports.c:614: error: syntax error before 'fport_seek_or_seek64'
fports.c:614: error: syntax error before 'off64_t'
fports.c:615: warning: return type defaults to 'int'
fports.c:615: warning: no previous prototype for 'fport_seek_or_seek64'
fports.c: In function 'fport_seek_or_seek64':
fports.c:616: error: 'port' undeclared (first use in this function)
fports.c:616: error: (Each undeclared identifier is reported only once
fports.c:616: error: for each function it appears in.)
fports.c:618: error: 'off64_t' undeclared (first use in this function)
fports.c:618: error: syntax error before 'rv'
fports.c:623: error: 'offset' undeclared (first use in this function)
fports.c:623: error: 'whence' undeclared (first use in this function)
fports.c:626: error: 'result' undeclared (first use in this function)
fports.c:626: error: 'rv' undeclared (first use in this function)
fports.c:626: warning: implicit declaration of function 'lseek64'
fports.c: In function 'fport_seek':
fports.c:677: error: 'off64_t' undeclared (first use in this function)
fports.c:677: error: syntax error before 'rv'
fports.c:678: error: 'rv' undeclared (first use in this function)
fports.c: In function 'scm_i_fport_truncate':
fports.c:711: warning: implicit declaration of function 'ftruncate64'
make[3]: *** [libguile_la-fports.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Error: The following dependencies failed to build: guile
Error: Status 1 encountered during processing.
bash-3.2$
The issue here is the Apple / Darwin 9 64-bit OS API doesn't define "standard" 64-bit functions for file access differently than 32-bit functions, except for 'X'stat64. Even 'off64_t' isn't defined. Instead, these functions "just work" correctly in 64-bit mode; there is no difference between the function calls for 32-bit or 64-bit functions. This is different with (at least) Linux, which seems to add the '64' extension for 64-bit functions, leaving the "non-64" functions for 32-bit functions, for backwards compatibility.
Most of the issues are in libguile/_scm.h, but there's still one in libguile/fports.c. I'll attach patches that fix these issues, though I really don't know if this is the correct way to do it. "make check" does work correctly with these, so they can't be too incorrect ;)