Ludovic Kuty wrote:
> Hi,
>
> I had the exact same problem and compiling it for my architecture just
> worked.
>
> Here is what I did:
>
> $ wget http://yaws.hyber.org/download/yaws-1.85.tar.gz
> $ tar xfz yaws-1.85.tar.gz 
> $ cd yaws
> $ ./configure
> $ make
> $ ls ../erlangweb-1.4/lib/yaws-1.85/
> $ cd ..
> $ cd erlangweb-1.4
> $ cd lib/
> $ cd yaws-1.85/
> $ rm -rf ebin/
> $ rm -rf include/
> $ rm -rf priv/
> $ cp -r ../../../yaws/ebin/ .
> $ cp -r ../../../yaws/include .
> $ cp -r ../../../yaws/priv .
> $ cd ..
> $ cd ..
> $ bin/start.erl yaws (EXTRA STEP. MAYBE NOT NECESSARY)
> $ bin/start_interactive yaws
>
> Eric, I didn't have a previous Yaws installation but compiled it from
> scratch. Maybe that made a difference compared to your setup.
>
> Hope that helps.
Thanks, Ludovic, it enlightens me.

So I checked the private libraries Michal said before, and found that
simply copy all of them looks solved this:

    $cp /usr/lib/erlang/lib/yaws-1.80/priv/lib/*.so
    ERLANG_WEB_SOURCE_ROOT/lib/yaws-1.85/priv/lib

This is because all the private libraries in priv directory are
architecture specified.
As indicated in the command, the yaws in my machine is not version 1.85
but 1.80.

Since from the source codes of yaws, related yaws_sendfile.erl have
changed several times after tag 1.80, and yaws would look up the priv
directory by -- ebin/../priv --, I prefer using totally 1.80(the
pre-installed version), so I :

    1 modify the script: ./bin/start_interactive, change the last line to:

        erl -pa lib/*/ebin -pa /usr/lib/erlang/lib/yaws-1.80/ebin -s
        e_start start $NODE_TYPE $SERVER $@

    2 modify the config file: ./config/yaws.conf, change the ebin_dir
    and include_dir configration(for sanity):

        ebin_dir = /usr/lib/erlang/lib/yaws-1.80/ebin
        include_dir = /usr/lib/erlang/lib/yaws-1.80/include

I works very well now. :D Thanks for both of you again.

Eric
>
> On 3 Nov 2009, at 13:19, Eric Liang wrote:
>
>> Michal Ptaszek wrote:
>>> Hello Eric, 
>>>
>>> Yaws is using some shared libraries, such as sendfile or
>>> setuid. Those included in the tarball have been compiled 
>>> under 64bit architecture:
>>> $ file setuid_drv.so 
>>> setuid_drv.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), 
>>> dynamically linked, not stripped
>>>
>>> The problem is when you try to use them on different architecture. 
>>> The easiest solution is to compile Yaws on your own and just replace
>>> lib/yaws-1.85 directory with your one.
>>>
>>>   
>> Thanks Michal for your prompt reply.
>>
>> I've checked the library file ,it is as you said. But I've already
>> installed yaws in my machine.
>>
>>     $yaws -v
>>     yaws 1.80
>>
>>     $ file /usr/lib/erlang/lib/yaws-1.80/priv/lib/setuid_drv.so
>>     /usr/lib/erlang/lib/yaws-1.80/priv/lib/setuid_drv.so: ELF 32-bit
>>     LSB shared object, Intel 80386, version 1 (SYSV), dynamically
>>     linked, stripped
>>
>> I've tried to copy the setuid_drv.so to
>> ERLANG_WEB_ROOT_DIRECTORY/lib/yaws-1.85/priv/lib/ , it doesn't work.
>> And I've checked the yaws.conf, it looks like no configuration about
>> how to set the ROOT_DIRECTORY to use the yaws already installed. Do
>> you know how to set this? or I have to get the latest yaws-1.85? TIA.
>>
>>> ----- "Eric Liang" <eric.l.2...@gmail.com> wrote:
>>>
>>>   
>>>> Hi all,
>>>> I've just tried erlangweb, but unfortunately, the script does't work
>>>> with yaws.
>>>>
>>>> Step by stepy, I followed the erlangweb wiki:
>>>> http://wiki.erlang-web.org/Install :
>>>>
>>>>    1. ./bin/compiler.erl yaws
>>>>    2. ./bin/start.erl yaws
>>>>    3. ./bin/start_interactive yaws  ---- Crash report occured here
>>>>
>>>> While the command ./bin/start_interactive (no yaws argument) can
>>>> start
>>>> inets successfully, and I can get the erlangweb-start message from my
>>>> browser.
>>>>
>>>> From the output, I guess this report will be valuable for this
>>>> problem:
>>>>
>>>>     =SUPERVISOR REPORT==== 3-Nov-2009::18:19:00 ===
>>>>          Supervisor: {local,yaws_sup_restarts}
>>>>          Context:    start_error
>>>>          Reason:     {'EXIT',{error,could_not_load_driver}}
>>>>          Offender:   [{pid,undefined},
>>>>                       {name,yaws_sendfile},
>>>>                       {mfa,{yaws_sendfile_compat,start_link,[]}},
>>>>                       {restart_type,permanent},
>>>>                       {shutdown,5000},
>>>>                       {child_type,worker}]
>>>>
>>>> I've tested the yaws_sendfile_compat module by calling:
>>>> yaws_sendfile_compat:start_link()  in the erlang vm, it looks like
>>>> works.
>>>>
>>>> So has anyone here got this problem? or what can I do next?
>>>> If anymore information required, please let me know. btw, any
>>>> suggestions will be appreciated.
>>>>
>>>> Thanks in advance.
>>>> Eric   
>>>>     
>>>
>>> Best regards,
>>>   
>>
>> ------------------------------------------------------------------------------
>> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
>> is the only developer event you need to attend this year. Jumpstart your
>> developing skills, take BlackBerry mobile applications to market and
>> stay
>> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
>> http://p.sf.net/sfu/devconference_______________________________________________
>> Erlangweb-users mailing list
>> Erlangweb-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
>> http://www.erlang-web.org/
>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry(R) Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay 
> ahead of the curve. Join us from November 9 - 12, 2009. Register now!
> http://p.sf.net/sfu/devconference
> ------------------------------------------------------------------------
>
> _______________________________________________
> Erlangweb-users mailing list
> Erlangweb-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/erlangweb-users
> http://www.erlang-web.org/

Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Erlangweb-users mailing list
Erlangweb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/erlangweb-users
http://www.erlang-web.org/

Reply via email to