Opened 11 years ago

Closed 9 years ago

Last modified 7 years ago

#916 closed defect (fixed)

0.2.0.33 doesn't compile on FC8 64-bit

Reported by: arma Owned by: nickm
Priority: Very Low Milestone: 0.2.1.x-final
Component: Core Tor/Tor Version: 0.2.0.33
Severity: Keywords:
Cc: arma, nickm Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description (last modified by nickm)

Reported by John Thompson:

It won't compile for me here (Fedora8 64bit). tor-0.2.32 compiled fine,
however, and 0.2.0.33 built fine on my NetBSD box. See attached log.

In file included from buffers.c:17:
or.h: In function 'TO_OR_CONN':
or.h:1102: warning: implicit declaration of function 'log'
or.h:1102: warning: incompatible implicit declaration of built-in function 'log'
or.h:1102: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1102: error: (Each undeclared identifier is reported only once
or.h:1102: error: for each function it appears in.)
or.h:1102: error: 'LD_BUG' undeclared (first use in this function)
or.h:1102: error: too many arguments to function 'log'
or.h: In function 'TO_DIR_CONN':
or.h:1107: warning: incompatible implicit declaration of built-in function 'log'
or.h:1107: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1107: error: 'LD_BUG' undeclared (first use in this function)
or.h:1107: error: too many arguments to function 'log'
or.h: In function 'TO_EDGE_CONN':
or.h:1112: warning: incompatible implicit declaration of built-in function 'log'
or.h:1112: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1112: error: 'LD_BUG' undeclared (first use in this function)
or.h:1112: error: too many arguments to function 'log'
or.h: In function 'TO_CONTROL_CONN':
or.h:1117: warning: incompatible implicit declaration of built-in function 'log'
or.h:1117: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1117: error: 'LD_BUG' undeclared (first use in this function)
or.h:1117: error: too many arguments to function 'log'
or.h: In function 'TO_OR_CIRCUIT':
or.h:1945: warning: incompatible implicit declaration of built-in function 'log'
or.h:1945: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1945: error: 'LD_BUG' undeclared (first use in this function)
or.h:1945: error: too many arguments to function 'log'
or.h: In function 'TO_ORIGIN_CIRCUIT':
or.h:1950: warning: incompatible implicit declaration of built-in function 'log'
or.h:1950: error: 'LOG_ERR' undeclared (first use in this function)
or.h:1950: error: 'LD_BUG' undeclared (first use in this function)
or.h:1950: error: too many arguments to function 'log'
buffers.c: In function 'chunk_new_with_alloc_size':
buffers.c:174: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:174: error: 'LOG_ERR' undeclared (first use in this function)
buffers.c:174: error: 'LD_BUG' undeclared (first use in this function)
buffers.c:174: error: too many arguments to function 'log'
buffers.c: In function 'chunk_grow':
buffers.c:226: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:226: error: 'LOG_ERR' undeclared (first use in this function)
buffers.c:226: error: 'LD_BUG' undeclared (first use in this function)
buffers.c:226: error: too many arguments to function 'log'
buffers.c: In function 'buf_shrink_freelists':
buffers.c:271: warning: implicit declaration of function 'log_info'
buffers.c:271: error: 'LD_MM' undeclared (first use in this function)
buffers.c:275: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:275: error: 'LOG_ERR' undeclared (first use in this function)
buffers.c:275: error: 'LD_BUG' undeclared (first use in this function)
buffers.c:275: error: too many arguments to function 'log'
buffers.c:288: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:288: error: too many arguments to function 'log'
buffers.c: In function 'buf_dump_freelist_sizes':
buffers.c:306: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:306: error: 'LD_MM' undeclared (first use in this function)
buffers.c:306: error: too many arguments to function 'log'
buffers.c:317: error: too many arguments to function 'log'
buffers.c:320: error: too many arguments to function 'log'
buffers.c: In function 'buf_pullup':
buffers.c:373: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:373: error: 'LOG_ERR' undeclared (first use in this function)
buffers.c:373: error: 'LD_BUG' undeclared (first use in this function)
buffers.c:373: error: too many arguments to function 'log'
buffers.c:381: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:381: error: too many arguments to function 'log'
buffers.c:393: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:393: error: too many arguments to function 'log'
buffers.c:406: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:406: error: too many arguments to function 'log'
buffers.c:411: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:411: error: too many arguments to function 'log'
buffers.c: In function 'buf_remove_from_front':
buffers.c:431: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:431: error: 'LOG_ERR' undeclared (first use in this function)
buffers.c:431: error: 'LD_BUG' undeclared (first use in this function)
buffers.c:431: error: too many arguments to function 'log'
buffers.c:433: warning: incompatible implicit declaration of built-in function '
log'
buffers.c:433: error: too many arguments to function 'log'
...

[Automatically added by flyspray2trac: Operating System: Fedora Core Linux]

Child Tickets

Change History (14)

comment:1 Changed 11 years ago by arma

Can you fetch the 0.2.1.11-alpha tarball and see if it builds there?

comment:2 Changed 11 years ago by nickm

Looks like log.h isn't being included from buffers.c for some reason.

comment:3 Changed 11 years ago by JohnDThompson

This appears to have resulted from a spurious CPPFLAGS in my build environment. After clearing this I was able to
successfully compile tor-0.2.0.33 on Fedora8 x86_64.

I think we can close this now.

comment:4 Changed 11 years ago by arma

Interesting. What was the wrong CPPFLAGS, so we can be more likely to recognize
this in the future?

(If one person has the problem, that means many more have it and have no idea
what's going on. Even a weird one like this. :)

comment:5 Changed 11 years ago by nickm

Doesn't look like he's going to answer. Closing the bug.

comment:6 Changed 11 years ago by nickm

flyspray2trac: bug closed.

comment:7 Changed 9 years ago by webasdf

Resolution: Not a bug
Status: closedreopened

Found an issue. I am attempting to cross-compile Tor 0.2.1.26 for OpenWRT on a Mikrotik MIPSBE board. So, I'm compiling everything from scratch. Found that log.h exists in the source tree for libevent. Right now (it's late) it seems to conflict with log.h in the tor-0.2.1.26/src/common directory. It's late, so I'll see if I can get Tor to compile by changing some filenames and modifying source.

comment:8 Changed 9 years ago by webasdf

BTW, using latest libevent source libevent-1.4.14b-stable. And, I'll be taking this up at a later time tomorrow or during the weekend when I'm awake :)

comment:9 Changed 9 years ago by nickm

Description: modified (diff)

Or just use libevent-2.0.5-beta, where the log.h header got renamed.

comment:10 Changed 9 years ago by webasdf

I ended up renaming tor-0.2.1.26/src/common/log.h to torlog.h and changing the includes in the source files. Compiled fine. This "bug" can probably be closed unless someone feels that log.h file name should be permanently changed in the source.

comment:11 Changed 9 years ago by nickm

Actually, renaming it seems like a fine idea for me, at least in 0.2.2.x. This took enough people long enough to work around that it seems worthwhile to fix in future versions.

Somebody please review branch rename_log_h in my public git repo ?

comment:12 Changed 9 years ago by nickm

Owner: set to nickm
Status: reopenedassigned

comment:13 Changed 9 years ago by nickm

Resolution: fixed
Status: assignedclosed

Header renamed in 14bc4dcc229fe45af48986820020779b440149cb; thanks to Sebastian for the review. Closing now. :)

comment:14 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.