Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2020-05-05 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, autotools, build, link,   |  Actual Points:
  static, 032-unreached-backport,|
  035-deferred-20190115, 041-proposed, 033   |
  -unreached-backport|
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-

Comment (by teor):

 Replying to [comment:32 werd]:
 > I want to build tor, not download it from somewhere else. My computer is
 on wifi so that prevents me from being an acceptable relay or bridge, best
 I can tell.  But after I copy over the binaries I made, to a computer with
 ethernet to the router, and run tor I get this:
 >
 > {{{
 > dyld: Library not loaded: @rpath/libclang_rt.asan_osx_dynamic.dylib
 >   Referenced from: /path/to/tor/bin/tor
 >   Reason: image not found
 > Abort trap: 6
 > }}}
 >
 > So it seems tor is relying on a library burried deep in xcode.

 This is the clang address sanitizer library. We don't recommend using it
 for relays or bridges, because it makes them crash on some non-fatal
 errors.

 You can disable this library by removing --enable-expensive-hardening or
 --enable-fragile-hardening from your configure command-line.

 > I've already built zlib, libevent, and libressl/openssl as static. My
 tor configure line informs tor of this. But as soon as I add {{{--enable-
 static-tor}}} and ./configure, the checking stops (as noted above in
 comment 21) here:
 >
 > {{{
 > checking whether free(NULL) works... no
 > configure: error: Your libc implementation doesn't allow free(NULL), as
 required by C99.
 > }}}
 >
 > Based on my reading of this ticket and others, it seems there is
 something out of order, but my attempts to mimic what others said worked
 for them, has not worked for me.
 >
 > I changed the order as noted in the patch here: #27802, (lines 169 &
 222), but the same error happened.

 Does macOS ship with a static C library?

 As far as I remember, it's not possible to build a truly static binary on
 macOS, because some of the lower-level OS libraries are dynamic. But you
 can get close.

 And I think you're actually trying to solve a slightly different problem,
 which is transferring a binary from one macOS to another. That shouldn't
 require a static tor, Tor Browser compiles a single binary that works on
 multiple macOS versions.

 Have you tried passing -mmacosx-version-min=version to your C compiler?
 That will disable any features that aren't available on newer macOS.

 Have you tried building all the dynamic libraries, and then copying them
 across with the binary? You may need to set the library paths correctly in
 the binary, or set LD_LIBRARY_PATH before launching it.

 You might also be happier if you use a package manager like HomeBrew to
 build from source on the wired Mac. It should have package definitions and
 debugging output that let you modify and verify the build.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2020-05-05 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay, autotools, build, link,   |  Actual Points:
  static, 032-unreached-backport,|
  035-deferred-20190115, 041-proposed, 033   |
  -unreached-backport|
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-

Comment (by werd):

 I want to build tor, not download it from somewhere else. My computer is
 on wifi so that prevents me from being an acceptable relay or bridge, best
 I can tell.  But after I copy over the binaries I made, to a computer with
 ethernet to the router, and run tor I get this:

 {{{
 dyld: Library not loaded: @rpath/libclang_rt.asan_osx_dynamic.dylib
   Referenced from: /path/to/tor/bin/tor
   Reason: image not found
 Abort trap: 6
 }}}

 So it seems tor is relying on a library burried deep in xcode.

 I've already built zlib, libevent, and libressl/openssl as static. My tor
 configure line informs tor of this. But as soon as I add {{{--enable-
 static-tor}}} and ./configure, the checking stops (as noted above in
 comment 21) here:

 {{{
 checking whether free(NULL) works... no
 configure: error: Your libc implementation doesn't allow free(NULL), as
 required by C99.
 }}}

 Based on my reading of this ticket and others, it seems there is something
 out of order, but my attempts to mimic what others said worked for them,
 has not worked for me.

 I changed the order as noted in the patch here: #27802, (lines 169 & 222),
 but the same error happened.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-10-01 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_revision
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-
Changes (by dgoulet):

 * status:  needs_review => needs_revision


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-25 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-

Comment (by nickm):

 Replying to [comment:22 sysrqb]:
 > Replying to [comment:21 nickm]:
 > > I'd actually like to deprecate the TOR_SEARCH_LIBRARY nonsense if
 possible, and not add its use for zlib.  (I don't understand why this
 patch starts using TOR_SEARCH_LIBRARY for zlib, but I assume it's
 necessary? Can we use pkg-config instead?)
 >
 > Hrm, it shouldn't. I simply moved the zlib check from being after the
 openssl checks to being before it (because openssl depends on zlib).

 Oh!  I didn't notice that this was moved code.  Okay, no need to change
 stuff in this patch.

 > >
 > > When I try to use this patch with `--enable-static-tor`, it fails
 during configuration with
 > > {{{
 > > checking whether free(NULL) works... no
 > > configure: error: Your libc implementation doesn't allow free(NULL),
 as required by C99.
 > > }}}
 > >
 > > Am I doing something wrong?
 > >
 >
 > Nope, that is possible. I ran into that, too. Do you have glibc-static
 installed? `-lc` is probably resulting in an error due to the lack of a
 static library. I should've added a more helpful error message for this
 case. I can do that.

 A better error message would be helpful, yes!

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-25 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-

Comment (by sysrqb):

 Replying to [comment:21 nickm]:
 > I'd actually like to deprecate the TOR_SEARCH_LIBRARY nonsense if
 possible, and not add its use for zlib.  (I don't understand why this
 patch starts using TOR_SEARCH_LIBRARY for zlib, but I assume it's
 necessary? Can we use pkg-config instead?)

 Hrm, it shouldn't. I simply moved the zlib check from being after the
 openssl checks to being before it (because openssl depends on zlib).

 >
 > When I try to use this patch with `--enable-static-tor`, it fails during
 configuration with
 > {{{
 > checking whether free(NULL) works... no
 > configure: error: Your libc implementation doesn't allow free(NULL), as
 required by C99.
 > }}}
 >
 > Am I doing something wrong?
 >

 Nope, that is possible. I ran into that, too. Do you have glibc-static
 installed? `-lc` is probably resulting in an error due to the lack of a
 static library. I should've added a more helpful error message for this
 case. I can do that.

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-25 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-

Comment (by nickm):

 I'd actually like to deprecate the TOR_SEARCH_LIBRARY nonsense if
 possible, and not add its use for zlib.  (I don't understand why this
 patch starts using TOR_SEARCH_LIBRARY for zlib, but I assume it's
 necessary? Can we use pkg-config instead?)

 When I try to use this patch with `--enable-static-tor`, it fails during
 configuration with
 {{{
 checking whether free(NULL) works... no
 configure: error: Your libc implementation doesn't allow free(NULL), as
 required by C99.
 }}}

 Am I doing something wrong?

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-24 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:  nickm|Sponsor:
-+-
Changes (by dgoulet):

 * reviewer:   => nickm


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-20 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  0.3.5.x-final
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static 029-backport 032-backport 033-backport  |
  034-backport   |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by teor):

 * keywords:  tor-relay autotools build link static =>
 tor-relay autotools build link static 029-backport 032-backport
 033-backport 034-backport
 * milestone:  Tor: unspecified => Tor: 0.3.5.x-final


Comment:

 I am not sure whether to put this fix in 0.3.5 or 0.3.6, but it would be
 nice to have a working static binary in our LTS release.

 It might also be good to backport these fixes, if they aren't too big,

--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2018-09-19 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:  (none)
 Type:  defect   | Status:
 |  needs_review
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by sysrqb):

 * status:  new => needs_review


Comment:

 Okay, I have a branch for this. The reason this was failing is because
 library order was partially reversed for linking. There are three
 remaining issues that need some clarification. Please see branch `bug6623`
 in my public user repo.

 However, overall, I wonder if there is any benefit in supporting static
 linking at this point. (To be clear, I don't actually have a use for this)

 

 The backtrace unit tests fail because the symbols are not shown/available.
 This needs further investigation.

 Statically linked:
 {{{
 $ ./src/test/test-bt-cl crash

  T= 1537399469
 Tor died: Caught signal 11
 [0x4074c9]
 [0x400df8]
 [0x400df8]
 [0x400e4d]
 [0x400e9d]
 [0x400eed]
 [0x4007d3]
 [0x41aac6]
 [0x41aec1]
 [0x400cca]
 Aborted (core dumped)
 }}}
 {{{
 $ ./src/test/test-bt-cl assert
 Sep 19 23:25:07.037 [err] tor_assertion_failed_(): Bug:
 src/test/test_bt_cl.c:46: crash: Assertion 1 == 0 failed; aborting. (on
 Tor 0.3.5.0-alpha-dev 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: Assertion 1 == 0 failed in crash at
 src/test/test_bt_cl.c:46. Stack trace: (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x4075a5] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x404294] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x400e29] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x400e4d] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x400e9d] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x400eed] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x4007d3] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x41aac6] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x41aec1] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 19 23:25:07.037 [err] Bug: [0x400cca] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Aborted (core dumped)
 }}}

 vs. Dynamically linked:

 {{{
 $ ./src/test/test-bt-cl crash

  T= 1537404853
 Tor died: Caught signal 11
 ./src/test/test-bt-cl(+0xa2a9)[0x576acdd052a9]
 ./src/test/test-bt-cl(crash+0x48)[0x576acdcfebd8]
 ./src/test/test-bt-cl(crash+0x48)[0x576acdcfebd8]
 ./src/test/test-bt-cl(oh_what+0x1d)[0x576acdcfec2d]
 ./src/test/test-bt-cl(a_tangled_web+0x1d)[0x576acdcfec7d]
 ./src/test/test-bt-cl(we_weave+0x1d)[0x576acdcfeccd]
 ./src/test/test-bt-cl(main+0xa3)[0x576acdcfe9d3]
 /lib64/libc.so.6(__libc_start_main+0xea)[0x726f7219d88a]
 ./src/test/test-bt-cl(_start+0x2a)[0x576acdcfeaaa]
 Aborted (core dumped)
 }}}
 {{{
 $ ./src/test/test-bt-cl assert
 Sep 20 00:47:26.187 [err] tor_assertion_failed_(): Bug:
 src/test/test_bt_cl.c:46: crash: Assertion 1 == 0 failed; aborting. (on
 Tor 0.3.5.0-alpha-dev 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: Assertion 1 == 0 failed in crash at
 src/test/test_bt_cl.c:46. Stack trace: (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-
 cl(log_backtrace_impl+0x45) [0x5b334ff78385] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-
 cl(tor_assertion_failed_+0x94) [0x5b334ff75074] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-cl(crash+0x79)
 [0x5b334ff71c09] (on Tor 0.3.5.0-alpha-dev 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-cl(oh_what+0x1d)
 [0x5b334ff71c2d] (on Tor 0.3.5.0-alpha-dev 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-
 cl(a_tangled_web+0x1d) [0x5b334ff71c7d] (on Tor 0.3.5.0-alpha-dev
 274ad5d643e969a6)
 Sep 20 00:47:26.188 [err] Bug: ./src/test/test-bt-cl(we_weave+0x1d)

Re: [tor-bugs] #6623 [Core Tor/Tor]: --enable-static-tor cannot succeed

2017-05-26 Thread Tor Bug Tracker & Wiki
#6623: --enable-static-tor cannot succeed
-+-
 Reporter:  tmpname0901  |  Owner:
 Type:  defect   | Status:  new
 Priority:  Medium   |  Milestone:  Tor:
 |  unspecified
Component:  Core Tor/Tor |Version:  Tor:
 |  0.2.3.20-rc
 Severity:  Normal   | Resolution:
 Keywords:  tor-relay autotools build link   |  Actual Points:
  static |
Parent ID:   | Points:
 Reviewer:   |Sponsor:
-+-
Changes (by nickm):

 * keywords:  tor-relay => tor-relay autotools build link static
 * severity:   => Normal


--
Ticket URL: 
Tor Bug Tracker & Wiki 
The Tor Project: anonymity online
___
tor-bugs mailing list
tor-bugs@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs