Code Monkey home page Code Monkey logo

Comments (10)

djireland avatar djireland commented on June 11, 2024 1

from link-grammar.

linas avatar linas commented on June 11, 2024

The call_once function is a part of C11

https://en.cppreference.com/w/c/thread/call_once

There are two possibilities: Either FreeBSD does not implement it (unlikely) or the -lpthreads library should have been linked, but wasn't. Possibly it has a different name in FreeBSD, e.g. pthread (without the s) or just thread (without the p). Of course, configure.ac should have taken care of this, but ...

Can you confirm by hacking which case this is? To find a symbol, in a library, it would be nm libpthreads.a (or .so, as the case may be) and see if call_once appears with a capital T in front of it. If you can find it, then configure is broken....

The ugly details of what gets linked can be seen by saying VERBOSE=1 make which will spew the actual compiler/linker flags.

from link-grammar.

djireland avatar djireland commented on June 11, 2024

from link-grammar.

linas avatar linas commented on June 11, 2024

Not a bother. As you follow up with the freebsd devs, the thing to track down is why configure didn't automatically find it. It should be in the AX_PTHREAD macro or maybe the AX_TLS macro from the autoconf-archive package.

from link-grammar.

linas avatar linas commented on June 11, 2024

@djireland -- any progress w/ why configure didn't automatically find -lstdthreads ?

I plan to issue a new release of LG "any day now" and would like to include any needed fixes in that.

from link-grammar.

linas avatar linas commented on June 11, 2024

I'm not sure how long it takes for them to get to it.

I strongly urge you to close this bug, and open a brand-new one with both the title of the bug, and the description of it rewritten. And also with the correct component. As written, it will never be fixed: people will look at it, think "its a link-grammar bug" and then ignore it or close it.

I'm certain this is a bug in the FreeBSD handling AX_PTHREAD macro in the autotools/automake/autoconf package. It should have detected and automatically included -lstdthreads.

So you want to open a bug report against autotools & friends, and say explicitly that "hey AX_PTHREAD did not do the right thing" and then point at this bug for proof.

from link-grammar.

linas avatar linas commented on June 11, 2024

OK, so here's what I did: I just now pushed this fix: 8d864c6

It looks for FreeBSD, and if it finds it, it will then automatically tack on -lstdthreads to the link line. It would be great if you can test it:

cd /where/ever/link-grammar
git pull
./autogen.sh --no-configure
mkdir build; cd build
../configure
make -j
sudo make install
make -j check

The above should work fine. The resulting link-grammar binary should work.

from link-grammar.

linas avatar linas commented on June 11, 2024

Let me know if it all works, now

from link-grammar.

djireland avatar djireland commented on June 11, 2024

from link-grammar.

linas avatar linas commented on June 11, 2024

OK, Thanks!

from link-grammar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.