2010-07-06 09:50:47     [Porting aps] Adding path to includes/libraries?

Document created by Aaronwu Employee on Oct 16, 2013
Version 1Show Document
  • View in full screen mode

2010-07-06 09:50:47     [Porting aps] Adding path to includes/libraries?

Gilles Ganault (FRANCE)

Message: 90961   

 

Hello

 

Using ./user/lua as a reference, I'm trying to add LuaSocket to the buildroot, but it's not happy because it can't find the includes it needs:

 

# cd /usr/src/uClinux-dist/user/luasocket/

# ls -l

luasocket-2.0.2/

Makefile

# make

make \

                -C luasocket-2.0.2 \

                INSTALL_TOP=/usr \

                PLAT=generic \

                CC=cc \

                AR="ar rcu" \

                RANLIB= \

                MYLIBS=""

[...]

cc  -DLUASOCKET_DEBUG  -pedantic -Wall -O2 -fpic   -c -o luasocket.o luasocket.c

lua.h: No such file or directory

 

# cd luasocket-2.0.2

# make

lua.h: No such file or directory

# make -I ../../lua/lua-5.1.4/src/

lua.h: No such file or directory

 

What is the right way to add paths to includes and libraries before trying to compile a package?

 

Thank you.

QuoteReplyEditDelete

 

 

2010-07-06 10:14:49     Re: [Porting aps] Adding path to includes/libraries?

Gilles Ganault (FRANCE)

Message: 90962   

 

I figured it out: Paths can be set in "config":

 

 

# cat ./luasocket-2.0.2/config

 

 

 

 

LUAINC=-I/usr/src/uClinux-build/user/lua/lua-5.1.4/src/

 

 

After cd'ing to ./user/luasocket/ and running "make", compiling + linking seem to work, but...

 

 

# file ./luasocket-2.0.2/src/socket.so.2.0.2

 

src/socket.so.2.0.2: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

 

 

Is this due to the fact that I ran "make" myself from the ./user/luasocket/ directory instead of through the buildroot, ie. "make menuconfig ; make" ? If so, it is possible to only compile this part so that I don't have to go through the full compiling of uClinux until LuaSocket compiles and runs OK?

 

Thank you for any hint.

QuoteReplyEditDelete

 

 

2010-07-06 10:36:00     Re: [Porting aps] Adding path to includes/libraries?

Mike Frysinger (UNITED STATES)

Message: 90963   

 

use `make user/foo_only` syntax

QuoteReplyEditDelete

 

 

2010-07-06 18:18:33     Re: [Porting aps] Adding path to includes/libraries?

Gilles Ganault (FRANCE)

Message: 90975   

 

Thanks Mike. It doesn't work but I'll learn more about how "make" works and should find out eventually.

 

 

 

# make ./user/luasocket/

make: Nothing to be done for `user/luasocket/'.

 

# make ./user/luasocket/luasocket-2.0.2/

make: Nothing to be done for `user/luasocket/luasocket-2.0.2/'.

 

# make ./user/luasocket/luasocket-2.0.2/src/

make: Nothing to be done for `user/luasocket/luasocket-2.0.2/src/'.

 

QuoteReplyEditDelete

 

 

2010-07-06 18:23:24     Re: [Porting aps] Adding path to includes/libraries?

Mike Frysinger (UNITED STATES)

Message: 90976   

 

you didnt use "_only" as i said

QuoteReplyEditDelete

 

 

2010-10-10 13:59:00     Re: [Porting aps] Adding path to includes/libraries?

Rob Maris (GERMANY)

Message: 94388   

 

https://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?_forum_action=ForumMessageBrowse&thread_id=41346&action=ForumBrowse&forum_id=39

 

 

 

Simple submodule test:

 

root: /> lua

Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio

> function load(s)

>> collectgarbage()

>> local a = gcinfo()

>> _G[s] = require(s)

>> collectgarbage()

>> local b = gcinfo()

>>     print(s .. ":\t " .. (b-a) .. "k")

>> end

>

> load("socket.url")

socket.url:      13k

> load("ltn12")

ltn12:   11k

> load("socket")

socket:  16k

> load("mime")

mime:    5k

> load("socket.tp")

socket.tp:       5k

> load("socket.smtp")

socket.smtp:     16k

> load("socket.http")

socket.http:     16k

> load("socket.ftp")

socket.ftp:      16k

> os.exit()

Attachments

    Outcomes