Re: problem compiling on Mac OS X

Asko Kauppi <[email protected]> Fri, 15 Apr 2005 23:36:41 +0300
Newsgroups gmane.comp.lang.lua.luacheia
Message-ID <[email protected]>
--Apple-Mail-3--1268441
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed


Seems to me, the lualib you're linking against does not have opnames 
included.  They're names of the Lua opcodes, or similar, and really 
take only a tiny portion of the executable size.  I'd have them always 
included.

However, to get you over with this, can you just switch off the 
"-DLUA_OPNAMES" somehow.  This should work.

As a connected issue, here's the 0.78-10 luax.info that can be used by 
'fink' to fetch, compile & install LuaX on OS X.  Quite neat, it sort 
of has all the details that Debian splits in several files, in one.  Is 
there anyone interested in crafting such for LuaCheia?  That'd solve OS 
X installation problems for good (I hope).

-ak


--Apple-Mail-3--1268441
Content-Transfer-Encoding: 7bit
Content-Type: application/octet-stream;
	x-unix-mode=0444;
	name="luax.info"
Content-Disposition: attachment;
	filename=luax.info

#
# luax.info	Fink packaging information for LuaX et.al.
#
# luax		LuaX main package (no samples, no selftests)
# luax-samples	LuaX sample scripts (Apps/*)
# luax-tests	Luax selftests (Tests/*)
#

# --- Common fields ---
#
# Note: the URL is completely different for each version. We use %v
#	only to keep "fink validate" happy.
#
Package: luax
Version: 0.78
Revision: 11
Source: http://luaforge.net/frs/download.php/684/luax-%v.tgz
Source-MD5: 2e7ce4a72c47c55a613a7c8f15684aef

Maintainer: Asko Kauppi <[email protected]>
Homepage: http://www.sci.fi/~abisoft/luax/
License: OSI-Approved

# --- LuaX Main package ---
#
BuildDepends: sdl (>= 1.2.6), sdl-image (>= 1.2.3), sdl-mixer (>= 1.2.5), smpeg, sqlite3
#Depends:
Recommends: sdl-shlibs (>= 1.2.6), sdl-image-shlibs (>= 1.2.3), sdl-mixer-shlibs (>= 1.2.5), smpeg-shlibs, sqlite3-shlibs

# Note: Only one compilescript common for all the Splitoffs 
#       (see http://fink.sourceforge.net/doc/packaging/reference.php?#splitoffs)
#
CompileScript: <<
rm -rf Integrate Modules/Dynacall Modules/Gtk+2 Scripts/win32
make
<<

InstallScript: <<
#! /bin/sh -ev
#
DEST=%i/lib/luax-%v

mkdir -p $DEST
mkdir -p $DEST/Bin
mkdir -p $DEST/Bin/Modules
mkdir -p $DEST/Scripts
mkdir -p $DEST/Scripts/darwin

cp -v kernel.lua mappings.lua $DEST/
cp -v out_darwin/luax out_darwin/luax_gui $DEST/Bin/
cp -v out_darwin/Modules/*.dylib $DEST/Bin/Modules/
rm -rf $DEST/Bin/Modules/sample_module.dylib

ls Modules
find Modules -name "*_wrap.lua" | xargs -t -I arg cp arg $DEST/Scripts/
cp -v Modules/luaSocket/*.lua $DEST/Scripts/
cp -Rv Scripts $DEST

# 0.78+ will use LUAX_ROOT, like this:
#
#cat luax | sed "s+LUAX_ROOT=\.+LUAX_ROOT=%p/lib/luax-%v" | \
#           sed "s+out_darwin+Bin+" > $DEST/luax

# this should work for 0.78:
#
cat luax | sed "s+out_darwin+%p/lib/luax-%v/Bin+" | \
           sed "s+demo\.lua+%p/lib/luax-%v/&+" | \
           sed "s+test\.lua+%p/lib/luax-%v/&+" | \
           sed "s+ Apps/+ %p/lib/luax-%v/Apps/+" | \
           sed 's+.LUAX .ARG+export LUA_PATH="%p/lib/luax-%v/\?.lua" \&\& &+' > $DEST/luax
chmod a+x $DEST/luax

mkdir -p %i/share/man/man1
cp out_darwin/man1/luax.1 %i/share/man/man1/

# startup link: /sw/bin/luax -> /sw/lib/luax-%n/luax
#
mkdir -p %i/bin
ln -s %p/lib/luax-%v/luax %i/bin/luax
<<

DocFiles: "Release notes.rtf" license.txt

Description: Lua with eXtensions; scriptable multi-OS programming
#              012345678901234567890123456789012345678901234567890123456789 (max len 60)
#             ^                                             ^--45          ^--60

DescDetail: <<
LuaX is an extension of the Lua 5.x programming language, including bindings
to selected C/C++ programming languages s.a. SDL. It allows for creating
fast, scripted applications that will run unmodified on any of the supported
platforms (Mac OS X, Linux, Win32, *BSD, PocketPC).

The original emphasis of LuaX is Embedded and Industrial applications, but
these have lately (0.78) been cut into a separate "LuaX for Instrumentation"
package. The remaining base package is general purpose.

LuaX is 100% compatible with Lua 5.x syntax, with the addition of built-in
support for enumerated types (including bitwise binary operations), 'switch'
construct, 'continue' keyword and such.
<<

DescUsage: <<
luax 			- launches LuaX command prom
luax myfile.lua		- executes your Lua script
luax demo		- runs a MeteorShower SDL demo
luax wav		- runs an SDL_Mixer demo
luax test		- runs LuaX selftests
<<

DescPackaging: <<
LuaX provides a self-sufficient runtime environment, and does not
need any shared libraries for programs to link to.
<<


# --- LuaX Samples ---
#
SplitOff: <<
Package: luax-samples

Depends: luax (>= %v-%r), sdl (>= 1.2.6), sdl-image (>= 1.2.3), sdl-mixer (>= 1.2.5), smpeg
#Depends: sdl (>= 1.2.6), sdl-image (>= 1.2.3), sdl-mixer (>= 1.2.5), smpeg

InstallScript: <<
#! /bin/sh -ev
#
DEST=%i/lib/luax-%v
mkdir -p $DEST/Apps
rm -rf Apps/gtk
cp -Rv Apps demo.lua $DEST
<<

DocFiles: "Release notes.rtf" license.txt

Description: Lua with eXtensions; sample packages
#              012345678901234567890123456789012345678901234567890123456789 (max len 60)
#             ^                                             ^--45          ^--60

DescDetail: <<
Sample scripts to show off LuaX in action.
<<
<<


# --- LuaX Self-tests ---
#
SplitOff2: <<
Package: luax-tests
#BuildDepends:
Depends: luax (= %v-%r)

InstallScript: <<
#! /bin/sh -ev
#
DEST=%i/lib/luax-%v
mkdir -p $DEST/Tests
rm -rf Tests/win32
rm -rf Tests/test_gpib.lua
cp -Rv Tests test.lua $DEST
<<

DocFiles: "Release notes.rtf" license.txt

Description: Lua with eXtensions; selftests
#              012345678901234567890123456789012345678901234567890123456789 (max len 60)
#             ^                                             ^--45          ^--60

DescDetail: <<
Selftests exercising LuaX modules, can be used as usage samples, too.
<<
<<

--Apple-Mail-3--1268441
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=US-ASCII;
	format=flowed




15.4.2005 kello 15:55, suppaman kirjoitti:

  Hi,
> I'm using Mac OS X 10.3.8, and I'm getting the following error:
>
> suppa$ make
> make  all-recursive
> Making all in lua-utils
> /bin/sh ../libtool --mode=link gcc -DLUA_OPNAMES -g -O2   -o luac  
> luac.o print.o -L. -llua -llualib
> gcc -DLUA_OPNAMES -g -O2 -o luac luac.o print.o  
> -L/Users/suppa/Desktop/luacheia5-5.0.1a5/lua-utils -llua -llualib
> ld: Undefined symbols:
> _luaP_opnames
> make[2]: *** [luac] Error 1
> make[1]: *** [all-recursive] Error 1
> make: *** [all] Error 2
>
>
> I've tried recompiling lopcodes.o with -DLUA_OPNAMES and putting it 
> into lua-utils directory but this doesn''t seem to help.
>
> Why do I get this error ? Is anyone experiencing this too?
>
> Actually I'd like to just make the doc but I'm not able to find what 
> target I should be pointing to.
>
>
> Thanks for any help.
>
>
>
> Bye
>
>
>
> -------------------------------------------------------
> SF email is sponsored by - The IT Product Guide
> Read honest & candid reviews on hundreds of IT Products from real 
> users.
> Discover which products truly live up to the hype. Start reading now.
> http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
> _______________________________________________
> Luacheia-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/luacheia-list
>

--Apple-Mail-3--1268441--



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click