OpenBSD sendfile

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

OpenBSD sendfile

Bogdan Andu
Hi,
I have a piece o software to install that requires
sendfile functionality .
I installed hs-sendfile from ports, which should providesendfile, but now
sendfile library or binary is present:
I run the command , first:sudo /usr/local/lib/ghc/sendfile-0.7.9/register.sh

and

$ sudo ldconfig -r|grep sendfile
yields nothing
Content of conf file:$ cat
/usr/local/lib/ghc/package.conf.d/sendfile-0.7.9-248b486519b80593a4ea3e29cb37
f1d7.conf
name: sendfile
version: 0.7.9
id: sendfile-0.7.9-248b486519b80593a4ea3e29cb37f1d7
license: BSD3
copyright:
maintainer: Jeremy Shaw <[hidden email]>
stability: provisional
homepage: http://hub.darcs.net/stepcut/sendfile
package-url:
synopsis: A portable sendfile library
description: A library which exposes zero-copy sendfile functionality in a
portable way. If a platform does not support sendfile, a fallback
implementation in haskell is provided.
             .
             Currently supported platforms: Windows 2000+
(Native), Linux 2.6+ (Native), FreeBSD (Native), OS-X 10.5+ (Native),
Everything else (Portable Haskell code).
category: Network
author: Matthew Elder <[hidden email]>
pkgpath: devel/hs-sendfile
exposed: True
exposed-modules: Network.Socket.SendFile
                 Network.Socket.SendFile.Iter
Network.Socket.SendFile.Handle
                 Network.Socket.SendFile.Portable
hidden-modules: Network.Socket.SendFile.Internal
                Network.Socket.SendFile.Util
trusted: False
import-dirs: /usr/local/lib/ghc/sendfile-0.7.9
library-dirs: /usr/local/lib/ghc/sendfile-0.7.9
hs-libraries: HSsendfile-0.7.9
extra-libraries:
extra-ghci-libraries:
include-dirs:
includes:
depends: base-4.6.0.1-6b06c3defb20732cfd08deb8ba52ca7c
         bytestring-0.10.0.2-1c6ab0cabcb254a0e55d751d8ef17b51
         network-2.4.1.2-3536dbdac401bfea4eb8f7e9e8ce77ed
hugs-options:
cc-options:
ld-options:
framework-dirs:
frameworks:
haddock-interfaces:
/usr/local/share/doc/hs-sendfile-0.7.9/html/sendfile.haddock
haddock-html: /usr/local/share/doc/hs-sendfile-0.7.9/html


Please advice me how to activate/use sendfile andmake it available to
applications that requires it.
Thanks,Bogdan

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Ted Unangst-6
Bogdan Andu wrote:
> Hi,
> I have a piece o software to install that requires
> sendfile functionality .
> I installed hs-sendfile from ports, which should providesendfile, but now
> sendfile library or binary is present:
> I run the command , first:sudo /usr/local/lib/ghc/sendfile-0.7.9/register.sh

> Please advice me how to activate/use sendfile andmake it available to
> applications that requires it.

Is the application you're using written in haskell?

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
No,
Erlang. Yaws wants it


     On Tuesday, September 29, 2015 6:33 PM, Ted Unangst <[hidden email]> wrote:
   

 Bogdan Andu wrote:
> Hi,
> I have a piece o software to install that requires
> sendfile functionality .
> I installed hs-sendfile from ports, which should providesendfile, but now
> sendfile library or binary is present:
> I run the command , first:sudo /usr/local/lib/ghc/sendfile-0.7.9/register.sh

> Please advice me how to activate/use sendfile andmake it available to
> applications that requires it.

Is the application you're using written in haskell?

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
Oh.. s^*%t, only haskell can use it, right?
 


     On Tuesday, September 29, 2015 6:48 PM, Bogdan Andu <[hidden email]> wrote:
   

 No,
Erlang. Yaws wants it


     On Tuesday, September 29, 2015 6:33 PM, Ted Unangst <[hidden email]> wrote:
   

 Bogdan Andu wrote:
> Hi,
> I have a piece o software to install that requires
> sendfile functionality .
> I installed hs-sendfile from ports, which should providesendfile, but now
> sendfile library or binary is present:
> I run the command , first:sudo /usr/local/lib/ghc/sendfile-0.7.9/register.sh

> Please advice me how to activate/use sendfile andmake it available to
> applications that requires it.

Is the application you're using written in haskell?

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
If one needs this linux-like crap, sendfile,and cannot disable it, how is he suppose to handle it?

 


     On Tuesday, September 29, 2015 6:50 PM, Bogdan Andu <[hidden email]> wrote:
   

 Oh.. s^*%t, only haskell can use it, right?
 


     On Tuesday, September 29, 2015 6:48 PM, Bogdan Andu <[hidden email]> wrote:
   

 No,
Erlang. Yaws wants it


     On Tuesday, September 29, 2015 6:33 PM, Ted Unangst <[hidden email]> wrote:
   

 Bogdan Andu wrote:
> Hi,
> I have a piece o software to install that requires
> sendfile functionality .
> I installed hs-sendfile from ports, which should providesendfile, but now
> sendfile library or binary is present:
> I run the command , first:sudo /usr/local/lib/ghc/sendfile-0.7.9/register.sh

> Please advice me how to activate/use sendfile andmake it available to
> applications that requires it.

Is the application you're using written in haskell?

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Stuart Henderson
On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> If one needs this linux-like crap, sendfile,and cannot disable it, how is he suppose to handle it?

Run it on linux?

I'm surprised Yaws needs it though, from what it says on their website
it looks optional.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
Running linux in production is not an option, for me at least.

I was surprised too. They put it recently into deps tree.

Is disabled at run time, but is required
at compile time..
I have scrambled the Makefiles and rebar.configs
and rebar.config.scripts and got rid of sendfileand compiles and runs fine on OpenBSD (amd64/5.7)
So, basically I have a non-sendfile-Yaws tree. Hurray!

Bogdan
 


     On Friday, October 2, 2015 10:38 AM, Stuart Henderson <[hidden email]> wrote:
   

 On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> If one needs this linux-like crap, sendfile,and cannot disable it, how is he suppose to handle it?

Run it on linux?

I'm surprised Yaws needs it though, from what it says on their website
it looks optional.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Raimo Niskanen-7
On Fri, Oct 02, 2015 at 08:19:28AM +0000, Bogdan Andu wrote:
> Running linux in production is not an option, for me at least.
>
> I was surprised too. They put it recently into deps tree.
>
> Is disabled at run time, but is required
> at compile time..
> I have scrambled the Makefiles and rebar.configs
> and rebar.config.scripts and got rid of sendfileand compiles and runs fine on OpenBSD (amd64/5.7)
> So, basically I have a non-sendfile-Yaws tree. Hurray!

Report that to the Yaws project.  They should not make themselves dependent
on features that are optional for Erlang and system dependent.

>
> Bogdan
>  
>
>
>      On Friday, October 2, 2015 10:38 AM, Stuart Henderson <[hidden email]> wrote:
>    
>
>  On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> > If one needs this linux-like crap, sendfile,and cannot disable it, how is he suppose to handle it?
>
> Run it on linux?
>
> I'm surprised Yaws needs it though, from what it says on their website
> it looks optional.

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
There is a general "mantra" many apps havenot just yaws, that real oses that
realy matterand make a difference are regarded as secondhand citizens(do it
yourself if u really need it) forthe simple fact that are no so "popular".On
the low end of the spectrum are those popular osesthat are supported in a
right out-of-the box manner.
Erlang peolpe were supposed to be Unix(ok, Sun) people.What happend with this
linuxcentrism?
Even if I make a report , the Makefiles are so polluted with sendfilethat I
dont see anybody to take change them.



     On Friday, October 2, 2015 12:40 PM, Raimo Niskanen
<[hidden email]> wrote:


 On Fri, Oct 02, 2015 at 08:19:28AM +0000, Bogdan Andu wrote:
> Running linux in production is not an option, for me at least.
>
> I was surprised too. They put it recently into deps tree.
>
> Is disabled at run time, but is required
> at compile time..
> I have scrambled the Makefiles and rebar.configs
> and rebar.config.scripts and got rid of sendfileand compiles and runs fine
on OpenBSD (amd64/5.7)
> So, basically I have a non-sendfile-Yaws tree. Hurray!

Report that to the Yaws project.  They should not make themselves dependent
on features that are optional for Erlang and system dependent.

>
> Bogdan
> 
>
>
>      On Friday, October 2, 2015 10:38 AM, Stuart Henderson
<[hidden email]> wrote:
>   
>
>  On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> > If one needs this linux-like crap, sendfile,and cannot disable it, how is
he suppose to handle it?
>
> Run it on linux?
>
> I'm surprised Yaws needs it though, from what it says on their website
> it looks optional.

--

/ Raimo Niskanen, Erlang/OTP, Ericsson AB

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Rob Schmersel
In reply to this post by Stuart Henderson
On Fri, 2 Oct 2015 07:38:28 +0000 (UTC)
Stuart Henderson <[hidden email]> wrote:

> On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> > If one needs this linux-like crap, sendfile,and cannot disable it,
> > how is he suppose to handle it?
>
> Run it on linux?
>
> I'm surprised Yaws needs it though, from what it says on their website
> it looks optional.
>

Sendfile support IS optional, from the include.mk:

ifeq ($(HAVE_SENDFILE),true)
  ERLC_GENERIC_FLAGS += -DHAVE_SENDFILE
endif

ifeq ($(HAVE_ERLANG_SENDFILE),true)
  ERLC_GENERIC_FLAGS += -DHAVE_ERLANG_SENDFILE
endif

So check what is happening and send a report to YAWS if sendfile seems
to be mandatory on OpenBSD, as then there is a bug in the makefile
generation.

Reply | Threaded
Open this post in threaded view
|

Re: OpenBSD sendfile

Bogdan Andu
Most likely...
I tried to apply the patches from yaws ports dirbut the version 2.0 of yaws 
is to new and the patches failed.
I'll send a report to Yaws people.
Thanks for help.
Bogdan



     On Friday, October 2, 2015 9:14 PM, Rob <[hidden email]> wrote:


 On Fri, 2 Oct 2015 07:38:28 +0000 (UTC)
Stuart Henderson <[hidden email]> wrote:

> On 2015-09-30, Bogdan Andu <[hidden email]> wrote:
> > If one needs this linux-like crap, sendfile,and cannot disable it,
> > how is he suppose to handle it?
>
> Run it on linux?
>
> I'm surprised Yaws needs it though, from what it says on their website
> it looks optional.
>

Sendfile support IS optional, from the include.mk:

ifeq ($(HAVE_SENDFILE),true)
  ERLC_GENERIC_FLAGS += -DHAVE_SENDFILE
endif

ifeq ($(HAVE_ERLANG_SENDFILE),true)
  ERLC_GENERIC_FLAGS += -DHAVE_ERLANG_SENDFILE
endif

So check what is happening and send a report to YAWS if sendfile seems
to be mandatory on OpenBSD, as then there is a bug in the makefile
generation.