Coder Social home page Coder Social logo

Comments (14)

jryaonj avatar jryaonj commented on September 24, 2024

Same problem here

When compiled in CentOS 7, everything is OK and proxychains4 runs fine

but in Ubuntu 14.10, compilation is OK, but when I ran any program, all results as:
symbol lookup error: ./libproxychains4.so: undefined symbol: pthread_once

If I change the lpthread to pthread, then results like this:
symbol lookup error: ./libproxychains4.so: undefined symbol: dlsym

have no idea how to change the compile option

from proxychains-ng.

jackyzy823 avatar jackyzy823 commented on September 24, 2024

in Makefile line 85
change to:
$(CC) -shared $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -lpthread $(LIBDL) -o $@ $(LOBJS)

from proxychains-ng.

jryaonj avatar jryaonj commented on September 24, 2024

@jackyzy823 THX so much!

Now everything works as the original proxychains3 does

from proxychains-ng.

kierr avatar kierr commented on September 24, 2024

Thank you @jackyzy823 !

This has solved the issue for me too.

from proxychains-ng.

jackyzy823 avatar jackyzy823 commented on September 24, 2024

You may google gcc link order for more detail and further understanding. :-)

from proxychains-ng.

rofl0r avatar rofl0r commented on September 24, 2024

@jackyzy823 care to create a pull request with your fix ?

from proxychains-ng.

proudzhu avatar proudzhu commented on September 24, 2024

This just breaks the linking on archlinux using gcc5.
$(CC) -shared -lpthread $(LIBDL) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS) works fine.

from proxychains-ng.

rofl0r avatar rofl0r commented on September 24, 2024

@proudzhu how weird. are you using the latest commit? and please paste output of the make invocation including the error.

from proxychains-ng.

proudzhu avatar proudzhu commented on September 24, 2024

I'm using release 4.9.
the output of running proxychains ls

[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
ls: symbol lookup error: /usr/lib/libproxychains4.so: undefined symbol: pthread_once

but running proxychains curl *** is fine.
revert this commit 377b474, everything works.
I think it is related with gcc versions, maybe they change some default behaviours during gcc updates.
@Kieters @jryaonj Can you provides your gcc versions?
And the PKGBUILD is here proxychains-ng

from proxychains-ng.

rofl0r avatar rofl0r commented on September 24, 2024

@proudzhu try to revert e79e05a as well. does that work ? this commit seems to be the original cause of the regression

from proxychains-ng.

proudzhu avatar proudzhu commented on September 24, 2024

@rofl0r
Finally I found that I have "--as-needed" in my local LDFLAGS, it is set in the default makepkg.conf which will be loaded when building a package in archlinux.
Then I found this wiki, in section "Fixing problems with --as-needed", it says "libraries don't create problems, because they are allowed to have undefined symbols".
So in my system, $(CC) -shared -lpthread $(LIBDL) $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -o $@ $(LOBJS) works, but $(CC) -shared $(LDFLAGS) $(LD_SET_SONAME)$(LDSO_PATHNAME) -lpthread $(LIBDL) -o $@ $(LOBJS) fails.
Maybe we should move "-lpthread $(LIBDL)" before $(LDFLAGS).
But I cannot figure out why the other users in the post failed to link against libpthread.
If it is a gcc link order issue as @jackyzy823 says ( but I'm confused as there is not other library in the argument), maybe we could change to
$(CC) -shared $(LD_SET_SONAME)$(LDSO_PATHNAME) -lpthread $(LIBDL) $(LDFLAGS) -o $@ $(LOBJS)?

from proxychains-ng.

caikechao avatar caikechao commented on September 24, 2024

The package proxychains-ng 4.9-1 I installed from the Arch Linux repository also throws out the error below when I run proxychains firefox

[proxychains] config file found: /etc/proxychains.conf
[proxychains] preloading /usr/lib/libproxychains4.so
sh: symbol lookup error: /usr/lib/libproxychains4.so undefined symbol: pthread_once

But the version proxychains-ng 4.8.1-1 works fine.

from proxychains-ng.

rofl0r avatar rofl0r commented on September 24, 2024

rather than putting more ducttape (#65) on the broken linker command line,
i reverted the original commit that introduced the breakage by shuffling the ld arguments around, and the following fixup by @jackyzy823, and introduced a clean way to deal with user-supplied LDFLAGS. please check if that fixes your issues.

from proxychains-ng.

proudzhu avatar proudzhu commented on September 24, 2024

@rofl0r it works now, thanks.

from proxychains-ng.

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.