Hopefully this is the right place, since there is no comp.programming.unix - BSD

This is a discussion on Hopefully this is the right place, since there is no comp.programming.unix - BSD ; or similar list that I can find. I am trying something on FreeBSD 7.0, with the built in GCC. I have a library I compiled (ctypeless -> libctypeless.a libctypeless.o), and have copied the .so and .a files over to /usr/lib ...

+ Reply to Thread
Results 1 to 20 of 20

Thread: Hopefully this is the right place, since there is no comp.programming.unix

  1. Hopefully this is the right place, since there is no comp.programming.unix

    or similar list that I can find. I am trying something on FreeBSD 7.0, with
    the built in GCC.

    I have a library I compiled (ctypeless -> libctypeless.a libctypeless.o),
    and have copied the .so and .a files over to /usr/lib

    I use dlopen to open the library:
    void *dlhandle = dlopen(libfile, RTLD_NOW | RTLD_GLOBAL);

    with libfile as "ctypeless", "libctypeless.so", "/usr/lib/libctypeless.so"

    and in all of the cases, the library will not open. dlhandle points to 0x0
    dlerror() returns: "Invalid shared object handle"

    Any suggestions, or is there a place I should ask other than here?

    Thanks,
    -Jim Stapleton



  2. You misspelt comp.unix.programmer

    Begin
    On Mon, 21 Jul 2008 12:24:45 -0400,
    S James S Stapleton wrote:
    [snip!]

    There, all fixed now. Provided you can find my answer.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  3. Re: You misspelt comp.unix.programmer

    So I didn't realize that was the name I needed to look for. No need to be
    rude about it. I feel like I've been transported to one of various Linux
    Forums all of a sudden...

    -Jim Stapleton



  4. Re: You misspelt comp.unix.programmer

    On Mon, 21 Jul 2008 17:10:49 UTC, "S James S Stapleton"
    wrote:

    > So I didn't realize that was the name I needed to look for. No need to be
    > rude about it. I feel like I've been transported to one of various Linux
    > Forums all of a sudden...


    I sometimes think jpd has escaped from there...

    --
    Bob Eager
    UNIX since v6..
    http://tinyurl.com/2xqr6h


  5. Re: Hopefully this is the right place, since there is no comp.programming.unix

    On Mon, 21 Jul 2008 16:24:45 UTC, "S James S Stapleton"
    wrote:

    > or similar list that I can find. I am trying something on FreeBSD 7.0, with
    > the built in GCC.
    >
    > I have a library I compiled (ctypeless -> libctypeless.a libctypeless.o),
    > and have copied the .so and .a files over to /usr/lib
    >
    > I use dlopen to open the library:
    > void *dlhandle = dlopen(libfile, RTLD_NOW | RTLD_GLOBAL);
    >
    > with libfile as "ctypeless", "libctypeless.so", "/usr/lib/libctypeless.so"
    >
    > and in all of the cases, the library will not open. dlhandle points to 0x0
    > dlerror() returns: "Invalid shared object handle"
    >
    > Any suggestions, or is there a place I should ask other than here?


    Did you run ldconfig?

    --
    Bob Eager
    UNIX since v6..
    http://tinyurl.com/2xqr6h


  6. Re: Hopefully this is the right place, since there is no comp.programming.unix


    "Bob Eager" wrote in message
    news:176uZD2KcidF-pn2-kg86fzqIHL7B@rikki.tavi.co.uk...
    > Did you run ldconfig?
    >


    Yeah, no go.

    Thanks,
    -Jim Stapleton



  7. Re: You misspelt comp.unix.programmer

    Bob Eager wrote:
    > On Mon, 21 Jul 2008 17:10:49 UTC, "S James S Stapleton" wrote:
    > > So I didn't realize that was the name I needed to look for. No need to be
    > > rude about it. I feel like I've been transported to one of various Linux
    > > Forums all of a sudden...

    >
    > I sometimes think jpd has escaped from there...


    jpd can be a bit "direct" at times. I didn't see anything particularly "rude"
    in this thread?

    - Philip

    --
    Philip Paeps Please don't email any replies
    philip@paeps.cx I follow the newsgroup.

    I think ... therefore I am confused.

  8. Re: Hopefully this is the right place, since there is no comp.programming.unix

    On Mon, 21 Jul 2008 12:24:45 -0400, "S James S Stapleton" wrote:
    > or similar list that I can find. I am trying something on FreeBSD 7.0, with
    > the built in GCC.
    >
    > I have a library I compiled (ctypeless -> libctypeless.a libctypeless.o),
    > and have copied the .so and .a files over to /usr/lib
    >
    > I use dlopen to open the library:
    > void *dlhandle = dlopen(libfile, RTLD_NOW | RTLD_GLOBAL);
    >
    > with libfile as "ctypeless", "libctypeless.so", "/usr/lib/libctypeless.so"
    >
    > and in all of the cases, the library will not open. dlhandle points to 0x0
    > dlerror() returns: "Invalid shared object handle"
    >
    > Any suggestions, or is there a place I should ask other than here?


    Three short questions:

    * Did you also try RTLD_LAZY?
    * What does file(1) say about libctypeless.so?
    * Can you try LD_PRELOAD-ing the library?

    For example, I wrote a tiny libgets.so.1 library to test a wrapper of
    gets() of my own that supports configurable options with GETS_OPTIONS,
    like the standard FreeBSD malloc() support for MALLOC_OPTIONS. I don't
    have to install it to test it, because preloading it works fine:

    ,-----------------------------------------------------------------------
    |
    | kobe % find .
    | .
    | ./libgets
    | ./libgets/Makefile
    | ./libgets/gets.o
    | ./libgets/gets.c
    | ./libgets/libgets.a
    | ./libgets/gets.po
    | ./libgets/libgets_p.a
    | ./libgets/gets.So
    | ./libgets/libgets.so
    | ./libgets/libgets.so.1
    | ./foo
    | ./foo/foo.o
    | ./foo/Makefile
    | ./foo/foo.c
    | ./foo/foo
    |
    | kobe % LD_PRELOAD=$(pwd)/libgets/libgets.so.1 ./foo/foo
    | stdio: running with gets() wrapper
    | What is your name?
    | This program is unsafe; it uses gets()
    | warning: this program uses gets(), which is unsafe.
    | Giorgos
    | Hi, Giorgos
    |
    | kobe %
    |
    `-----------------------------------------------------------------------

    Can you try something similar with libctypeless.so.1 and see if it works
    for you? Maybe there's something odd about the way it was built and the
    runtime linker fails to load it.


  9. Re: You misspelt comp.unix.programmer

    Begin
    On 21 Jul 2008 21:32:53 GMT, Philip Paeps wrote:
    > Bob Eager wrote:
    >> On Mon, 21 Jul 2008 17:10:49 UTC,
    >> "S James S Stapleton" wrote:
    >> > So I didn't realize that was the name I needed to look for. No need
    >> > to be rude about it. I feel like I've been transported to one of
    >> > various Linux Forums all of a sudden...

    >>
    >> I sometimes think jpd has escaped from there...

    >
    > jpd can be a bit "direct" at times. I didn't see anything particularly
    > "rude" in this thread?


    Maybe I should change that. Then again, I might as well start posting in
    those ``forums'', or ``lists'', or whatever they're called this week,
    while at it... nah.


    Bit of a pity the OP didn't get the hint, but no surprise, really.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  10. Re: You misspelt comp.unix.programmer

    On Mon, 21 Jul 2008 21:32:53 UTC, Philip Paeps
    wrote:

    > Bob Eager wrote:
    > > On Mon, 21 Jul 2008 17:10:49 UTC, "S James S Stapleton" wrote:
    > > > So I didn't realize that was the name I needed to look for. No need to be
    > > > rude about it. I feel like I've been transported to one of various Linux
    > > > Forums all of a sudden...

    > >
    > > I sometimes think jpd has escaped from there...

    >
    > jpd can be a bit "direct" at times. I didn't see anything particularly "rude"
    > in this thread?


    I did say "sometimes". The rudeness, such as it was, was in the title,
    which was a comment on the original, different, thread.

    The Linux people are worse, mind.

    --
    Bob Eager
    UNIX since v6..
    http://tinyurl.com/2xqr6h


  11. Re: You misspelt comp.unix.programmer

    jpd wrote:

    [snip]
    >
    > Maybe I should change that. Then again, I might as well start posting in
    > those ``forums'', or ``lists'', or whatever they're called this week,
    > while at it... nah.
    >


    Haven't you heard? Google Groups are teh so 31337! Everyone on Usenet should
    be using teh Google Groups!



    [snip]

    -Jason


  12. Re: You misspelt comp.unix.programmer

    > Bit of a pity the OP didn't get the hint, but no surprise, really.

    The hint that the group I should go to is in the title? Got that, and even
    posted there long before this reply of mine. Maybe the hint was you would
    rather I not post here at all? If that's the case, it's not a matter of not
    getting the hint.

    Anyway, the rudeness was in the title. I didn't misspell anything - that
    suggest I didn't intend to post on this group in the first place. Then
    suggeting that the title of the thread was potentially something I couldn't
    find... That was also rather rude.


    -Jim Stapleton



  13. Re: Hopefully this is the right place, since there is no comp.programming.unix

    > * Did you also try RTLD_LAZY?

    Just did, no success

    > * What does file(1) say about libctypeless.so?


    [sjss@aragorn ~]$ file /usr/lib/libctypeless.so
    /usr/lib/libctypeless.so: ELF 32-bit LSB shared object, Intel 80386, version
    1 (FreeBSD), dynamically linked, not stripped

    > * Can you try LD_PRELOAD-ing the library?


    Ahh, there's something. I'm getting an 'Undefined symbol' error. The symbol
    is defined as a 'extern unsigned short' in the header file, and 'unsigned
    short' in the main C file for the library.

    I'll look into this some more, thanks.

    -Jim Stapleton



  14. Re: You misspelt comp.unix.programmer

    On Tue, 22 Jul 2008 08:41:21 -0400,
    S James S Stapleton wrote:
    [attribution of quote missing]
    >> Bit of a pity the OP didn't get the hint, but no surprise, really.

    >
    > The hint that the group I should go to is in the title? Got that, [...]


    You didn't, apparently, figure out why I put it there, instead of
    somewhere usually regarded as more convenient.


    > Anyway, the rudeness was in the title. [...]


    Seeing how you make rather a mess of the accepted ``polite format''
    of usenet messages -- I so far haven't seen a post by you that didn't
    fell short in some interesting way -- I like how you complain on the
    judgement you yourself passed on my followup.

    Why do you complain about a question answered the Subject: line when
    put there and not in the message body?


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  15. Re: You misspelt comp.unix.programmer

    > You didn't, apparently, figure out why I put it there, instead of
    > somewhere usually regarded as more convenient.


    Putting it in a place that I can read without even opening the post...
    There's a place more convinient?

    > I so far haven't seen a post by you that didn't
    > fell short in some interesting way


    My first post wasn't impolite. It was maybe ignorant on where exactly to
    look, I thought I was fairly appologetic about potentially being in the
    wrong place, but given I'm doing this on a FreeBSD system, it was at least a
    semi-decent place. It's not like I was posting it on comp.os.windows or
    something.

    My replies to the people that helped me, as far as I can tell, were polite.

    My replies to you were not. I'll accept that, one of my failings, I admit,
    is that I tend to lash back at people who are rude to me. I appologize, for
    it, even if my responses are not unreasonable.

    > Why do you complain about a question answered the Subject: line when
    > put there and not in the message body?


    I didn't. Look back, I complained about the 'you misspelled' portion, and
    the fact that you insinuated that I wouldn't be able to find it there (and
    it was the first thing I noticed). The rest of the complaint was how you
    handled it in the body of the text.

    And I'll bite, what was your hint putting it in the subject line?

    -Jim Stapleton




  16. Re: You misspelt comp.unix.programmer

    On Tue, 22 Jul 2008 11:40:24 -0400,
    S James S Stapleton wrote:
    [snip!]
    > I didn't. Look back, I complained about the 'you misspelled' portion,


    Which you did. You assumed a group with a certain function did not exist
    because you couldn't find it by the name you tried, but it does exist
    with a slightly different name. A misspelling.


    > and the fact that you insinuated that I wouldn't be able to find
    > it there (and it was the first thing I noticed). The rest of the
    > complaint was how you handled it in the body of the text.
    >
    > And I'll bite, what was your hint putting it in the subject line?


    You'll bite? After you ``apologized'' while explaining you're not
    meaning it because you're convinced you know better? Well, since we're
    being civilised and all, I'm sure you can find the correct alternatives,
    once you stop deciding the rest of the universe must be at fault and
    therefore rude. A mere reading of RFC1855 could go a long way, really.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  17. Re: You misspelt comp.unix.programmer

    Please, calm down. You are reading way to much into everything I've said
    while being condescending about it. That isn't necessary. I never said the
    correct group didn't exist, I merely said I couldn't find it, and if this
    wasn't the right place, could someoen please direct me. I never even said I
    didn't make any mistakes - I sure as hell did. However, I DID NOT make the
    mistakes you assumed I made. My mistakes were due to missing cognitive
    associations, and therefore not knowing where to look, and a short temper
    with people who are condescending.

    Being condescending doesn't help anyone, unless you want them to quit - that
    doesn't help the community at all. Regardless, I'll look at that RFC, and
    thanks for the info.

    -Jim Stapleton



  18. Re: You misspelt comp.unix.programmer

    > My mistakes were due to missing cognitive associations, and therefore not
    > knowing where to look, and a short temper with people who are
    > condescending.


    Oh, and I expressed myself poorly, I said 'there is no...' and named a
    specific group name (which doesn't exist), as what I thought was a
    straightforward example of a group I was looking for. I'll admit I rather
    screwed up on that one. But I would never had considered looking for
    'programmer' - that strikes me as a job-hiring list name rather than a help
    list, the cognitive association issue I mentioned.





  19. Re: You misspelt comp.unix.programmer

    Hi

    On 2008-07-25 05:35:48 +1000, "S James S Stapleton"
    said:
    >
    > Being condescending doesn't help anyone, unless you want them to quit - that
    > doesn't help the community at all. Regardless, I'll look at that RFC, and
    > thanks for the info.


    Most of the time I find jpd extremely rude, and worse totally
    non-constructive just throwing is $0.02 here and there.

    I'd just ignore him...
    It's very rare for him to provide a valuable answer. Usually, his
    answers can usually be summarised with
    "you idiot this is a stupid question, why are you trying to do is dumb
    and you shouldn't". Leaving short of explaining what actually would be
    a better way.

    Back to your question:
    dlopen takes the full path of the dll file ...
    like dlopen("/usr/local/lib/libmylib.so" ...

    Make sure you have the permissions to access the library.

    Are you sure it's dlopen generating that error?
    it sounds more like you're calling a function with an invalid handler.
    Like you call dlopen which returns null and then you call dlclose with null.

    Or something like that.

    Jean-Yves

    --
    They who would give up an essential liberty for temporary security,
    deserve neither liberty or security (Benjamin Franklin)


  20. Re: You misspelt comp.unix.programmer

    On Mon, 21 Jul 2008 16:50:56 +0000, jpd wrote:
    >
    > There, all fixed now. Provided you can find my answer.


    Actually, um...you misspelled "misspelled". :-)

    --
    At present there is not a single credible established religion in the
    world.
    -- George Bernard Shaw, Irish-born English playwright

+ Reply to Thread