Erlang/OTP Forums

Author Message

<  Erlang  ~  ei Compilation issues

floda47
Posted: Mon Feb 23, 2009 12:24 pm Reply with quote
Joined: 23 Feb 2009 Posts: 1
Hi,
i am about to use the erlang interface to bridge arguments from erlang to C code (a customized version of bfile). Compilation works, however linking fails either with "ld" or at least at loading the module later in erlang (when compiled with ld -shared ...).

The detailed output is attached. ld finds the liberl_interface and libei.a but seems not to be able to resolve the references in ei, e.g. ei_decode_string.

Any comments are highly appreciated.

ld -o ../priv/FILE_drv.so -L/usr/local/lib/erlang/lib/erl_interface-3.5.9/lib -lei -lerl_interface FILE_drv.o
ld: warning: cannot find entry symbol _start; defaulting to 00000000004000f0
FILE_drv.o: In function `driver_ret32':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:166: undefined reference to `driver_alloc_binary'
FILE_drv.o: In function `driver_error':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:152: undefined reference to `erl_errno_id'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:152: undefined reference to `strlen'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:152: undefined reference to `driver_alloc_binary'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:156: undefined reference to `erl_errno_id'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:146: undefined reference to `__ctype_tolower_loc'
FILE_drv.o: In function `FILE_control':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:216: undefined reference to `ei_decode_version'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:279: undefined reference to `read'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:266: undefined reference to `write'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:281: undefined reference to `__errno_location'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:293: undefined reference to `stderr'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:293: undefined reference to `fprintf'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:296: undefined reference to `fprintf'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:303: undefined reference to `lseek64'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:310: undefined reference to `fprintf'
FILE_drv.o: In function `driver_ret64':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:177: undefined reference to `driver_alloc_binary'
FILE_drv.o: In function `FILE_control':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:231: undefined reference to `ei_decode_tuple_header'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:232: undefined reference to `ei_decode_long'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:233: undefined reference to `ei_decode_long'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:234: undefined reference to `ei_decode_string'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:239: undefined reference to `stderr'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:239: undefined reference to `fprintf'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:247: undefined reference to `stderr'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:247: undefined reference to `fprintf'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:248: undefined reference to `open64'
FILE_drv.o: In function `driver_ok':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:187: undefined reference to `driver_alloc_binary'
FILE_drv.o: In function `FILE_control':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:253: undefined reference to `open64'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:305: undefined reference to `__errno_location'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:305: undefined reference to `fprintf'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:306: undefined reference to `fprintf'
FILE_drv.o: In function `FILE_stop':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:140: undefined reference to `close'
FILE_drv.o: In function `FILE_start':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:122: undefined reference to `driver_alloc'
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:130: undefined reference to `set_port_control_flags'
FILE_drv.o: In function `FILE_stop':
/home/trxadm/projects/erlio/priv/bfile/c_src/FILE_drv.c:141: undefined reference to `driver_free'
trxadm@dqkal136:~/projects/erlio/priv/bfile/c_src>
View user's profile Send private message
steve-e
Posted: Tue Feb 24, 2009 4:40 pm Reply with quote
Joined: 24 Feb 2009 Posts: 1
Hey,



try those two and have fun:
Quote:

gcc -o FILE_drv.o -c -fpic -g -O2 -DHAVE_CONFIG_H -Wall -g -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib/erlang/usr/include -I/usr/lib/erlang/lib/erl_interface-3.5.9/include -I../config -I. -DDYNAMIC_DRIVER FILE_drv.c


Quote:

ld -shared -L/usr/lib/erlang/lib/erl_interface-3.5.9/lib -o ../priv/FILE_drv.so FILE_drv.o -lerl_interface -lei


Best Regards.[/quote]
View user's profile Send private message
wuji
Posted: Sat Aug 18, 2012 6:12 am Reply with quote
User Joined: 10 Aug 2012 Posts: 654
that we're seeing -- and we've seen some of this this [h3]cheap designer *beep*[/h3] this behavior in the past couple months -- might suggest
Meaning hyperactivity, hyper energy, been possibly up and not not replica designer bags for sale not sleeping for days. What we might be seeing
is the post effects."But Randazzo also said there was a a cheap replica *beep* a third possibility. He might simply be faking it."It's possible,"
said when asked if Holmes' behavior could be all an an [h4]Cheap Ralph Lauren Shirts[/h4] an act. "It is possible. We'll leave that open," she
adding that most people who lie about that sort of of [h1]designer replica *beep*[/h1] of behavior are sociopaths and "What we've heard about his
does not suggest sociopath at all.""Let's keep that in mind mind cheap Christian Louboutin mind that he was studying neuroscience. He was studying
the type of brain issues that we're going to be be cheap Christian Louboutin be talking about throughout this whole case," she said.'Berlin Patient'
Brown Says He Is Still HIV-FreeFirst Man Thought to Be Be [h2]cheap replica *beep*[/h2] Be Cured of HIV Dispels Rumors, Announces New FoundationBy
A. MCCLELLAN, M.D.July 24, 2012— Timothy Ray Brown, who is is cheap designer *beep* is believed to be the first person to have ever
View user's profile Send private message
dongdongwu
Posted: Thu Sep 20, 2012 3:28 am Reply with quote
User Joined: 19 Sep 2012 Posts: 236
His good friend Diane said: "Christian Louboutin Men Shoes was a magician, he make shoes is immediately put his female people with legs and advantage. He understands women wanted to do and can make them into beautiful Cinderella." Madonna often in its concert wearing Christian louboutin high heels , and some famous superstar like Angelina jolie, mariah Carey, beyonce Knowles, the famous Japanese singer YaYouMei Hamasaki helps Christian Louboutin Men Shoes set up its powerful position. The youngest customers will count Tom cruise's daughter sully cruz. Louboutin made for only a pair of handmade Christian Louboutin high heel Shoes! Want to be more fashion? Put on Christian Louboutin Outlet !
Candy colors of the chalaza high-heeled shoes with lolita type allure, set full finely gem blue "neon shoes" is to need to use "sexy" to describe. Each pair are worth careful appreciation of lithe and graceful fairy ludaoli, what kind of most let you move?Christian Louboutin Men Shoes that one brush red is always cannot resist the temptation, Christian Louboutin men outlet continue to use the days of high 8cm above slender heel proclaim the sexy and luxuriant. The bowknot on black pointed high-heeled shoes with sharp rivet concomitant, wild python met enchanting color printing grain, It is that pairs of high-heeled shoes lets Carrie more feminine flavour. Like Christian Louboutin for men her word.
View user's profile Send private message

Display posts from previous:  

All times are GMT
Page 1 of 1
This forum is locked: you cannot post, reply to, or edit topics.

Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum