Opened 11 years ago

Closed 4 years ago

#40433 closed defect (worksforme)

lua @5.2.2 fails to build on Tiger (with solution)

Reported by: mp@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.2.0
Keywords: tiger haspatch Cc: mikeformac@…
Port: lua

Description

During build on Tiger (10.4), lua 5.2.2 fails to compile liolib.c (off_t undeclared)

:info:build /usr/bin/gcc-4.0 -O2 -Wall -DLUA_COMPAT_ALL -fno-common -DLUA_USE_MACOSX\
    -Os -I/opt/local/include -arch ppc   -c -o liolib.o liolib.c
:info:build liolib.c: In function ‘f_seek’:
:info:build liolib.c:551: error: ‘off_t’ undeclared (first use in this function)
:info:build liolib.c:551: error: (Each undeclared identifier is reported only once
:info:build liolib.c:551: error: for each function it appears in.)
:info:build liolib.c:551: error: parse error before ‘offset’
:info:build liolib.c:552: error: ‘offset’ undeclared (first use in this function)
:info:build make[2]: *** [liolib.o] Error 1

Solution is to add

#include <sys/types.h>

as advised in http://lua-users.org/lists/lua-l/2011-12/msg00708.html

Attaching solution as Portfile diff.

Attachments (2)

main.log (24.9 KB) - added by mp@… 11 years ago.
portfile.diff (644 bytes) - added by mp@… 11 years ago.
Solution as Portfile diff

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by mp@…

Attachment: main.log added

Changed 11 years ago by mp@…

Attachment: portfile.diff added

Solution as Portfile diff

comment:1 Changed 11 years ago by mp@…

Cc: mp@… added

Cc Me!

comment:2 Changed 11 years ago by mf2k (Frank Schima)

Cc: mp@… removed

The reporter is automatically Cc'ed.

comment:3 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: mikeformac@… added

Has duplicate #40482.

comment:4 Changed 4 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

lua is currently at version 5.3.5 and there is a lua52 port now. If there is still a problem, please open a new ticket against the appropriate port (lua or lua52) with the main.log file.

Note: See TracTickets for help on using tickets.