Opened 3 years ago

Closed 3 years ago

#19767 closed defect (fixed)

Solaris, compile warning: "_FILE_OFFSET_BITS" redefined and core dump

Reported by: RainerSchmidt Owned by: nickm
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version: Tor: 0.2.8.5-rc
Severity: Major Keywords: Solaris, regression, crash, 028-backport
Cc: Actual Points: .3
Parent ID: Points: 0.2
Reviewer: Sponsor:

Description

I'm trying to get tor-0.2.8.5-rc running, but compile warnings and core dumps. ( tor-0.2.7.6 works )

Environment: Solaris 10, Intel 32bit, gcc 5.2.0

When compiling I get the warnings like these:

"...
In file included from src/test/test-child.c:5:0:
./orconfig.h:689:0: warning: "_FILE_OFFSET_BITS" redefined

#define _FILE_OFFSET_BITS 64

In file included from /usr/include/stdio.h:21:0,

from src/test/test-child.c:4:

/opt/csw/lib/gcc/i386-pc-solaris2.10/5.2.0/include-fixed/sys/feature_[tests.h:196:0 tests.h:196:0]: note: this is the location of the previous definition

#define _FILE_OFFSET_BITS 32

..."

The binary gets build, but when I run:
gmake test
or
gmake install and start tor,
it dies with a core dump.

tor-0.2.7.6 runs fine

Please help getting the issue fixed, any help is appreciated!

Thanks.

Regards
Rainer

Child Tickets

Attachments (3)

build_tor-0.2.8.5-rc.log.tgz (7.2 KB) - added by RainerSchmidt 3 years ago.
build logfile
tor_git_log.tgz (848 bytes) - added by RainerSchmidt 3 years ago.
solaris_warnings_028.log.tgz (1.4 KB) - added by RainerSchmidt 3 years ago.

Download all attachments as: .zip

Change History (19)

Changed 3 years ago by RainerSchmidt

build logfile

comment:1 Changed 3 years ago by teor

Keywords: regression added; core dump compile warning_FILE_OFFSET_BITS removed
Milestone: Tor: 0.2.8.x-final
Points: 0.2

I don't think we can break a platform.
So this needs to be fixed before 0.2.8-stable.

comment:2 Changed 3 years ago by teor

Keywords: crash added

comment:3 Changed 3 years ago by nickm

It looks like we need include orconfig.h before we include anything that includes feature_tests.h.

comment:4 Changed 3 years ago by nickm

This warning appears 25 times.

comment:5 Changed 3 years ago by nickm

I don't think we can break a platform.

Well, it apparently isn't a platform that anybody tested 0.2.8 on at any time in the last 5 months. So I'm not sure it's a good idea to apply any patch here without a lot of testing, or to hold up the 0.2.8.6 release for all the platforms whose users _did_ test one of the alphas.

That said, I've tried to fix up the warnings in a branch called "solaris_warnings_028" in my public git repository at https://git.torproject.org/nickm/tor.git . If the file_offset_bits issue is causing the crash, I hope this will fix that. Please review and test?

I worry that these changes might break compilation on other platforms.

comment:6 Changed 3 years ago by nickm

Actual Points: .3
Owner: set to nickm
Status: newaccepted

comment:7 Changed 3 years ago by nickm

Status: acceptedneeds_review

comment:8 Changed 3 years ago by RainerSchmidt

I'm not an expert, I tried the fix described above as follows, but it didn't work:

git clone ​https://git.torproject.org/nickm/tor.git

After downloading I checked the README and because there is no "./configure" I used:

sh autogen.sh

but this gave the warnings/errors in the attached log: tor_git.log.

I'm not an expert in building/compiling SW with git (in the past I used download source and ./configure).
So please help to get it working.
Thanks.

Changed 3 years ago by RainerSchmidt

Attachment: tor_git_log.tgz added

comment:9 Changed 3 years ago by nickm

You're almost there! But you're on the master branch, and you need to switch to the 'solaris_warnings_028' branch. To do that (assuming you have a halfway recent git) just run "git checkout solaris_warnings_028".

Changed 3 years ago by RainerSchmidt

comment:10 Changed 3 years ago by RainerSchmidt

Thanks, I tried your recommendation but failed, still getting the same problem.
After successful running

git clone ​​https://git.torproject.org/nickm/tor.git

I changed to the tor directory and run

git checkout solaris_warnings_028

This seemed successful, so I run:

sh autogen.sh

and got the same warnings/errors then before  (please see: solaris_warnings_028.log.tgz)
Any help is appreciated

comment:11 Changed 3 years ago by nickm

That's strange. These aren't the same warnings; these are about autoconf failing.

comment:12 Changed 3 years ago by nickm

Keywords: review-group-7 added

comment:13 Changed 3 years ago by dgoulet

Status: needs_reviewmerge_ready

The fix does look OK to me but it's just impossible for me to confirm.

As for the trunnel commit, +9k! I actually need that one :).

comment:14 Changed 3 years ago by nickm

Keywords: review-group-8 added; review-group-7 removed

comment:15 Changed 3 years ago by nickm

Keywords: 028-backport added; review-group-8 removed
Status: merge_readyneeds_review

Okay, merging this to master, as "probably harmless". Not going to do an 0.2.8 backport, though, unless it's actually confirmed to help.

comment:16 Changed 3 years ago by nickm

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final
Resolution: fixed
Status: needs_reviewclosed

No 0.2.8 backport planned; too big.

Note: See TracTickets for help on using tickets.