View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003982 | unreal | installing | public | 2010-12-22 17:44 | 2010-12-24 17:13 |
Reporter | CuleX | Assigned To | ohnobinki | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Platform | i686 | OS | OpenBSD | OS Version | 4.8 |
Product Version | 3.2.9-RC1 | ||||
Fixed in Version | 3.2.9-RC2 | ||||
Summary | 0003982: Build fails on trying to link tre | ||||
Description | I configured UnrealIRCd with spoof-protection, IPv6, SSL and ziplinks (config.log in attached file) and get an error when trying to link tre (the one included in the UnrealIRCd distribution, not of a system-wide installation): ircd.o(.text+0x17c3): In function `main': /home/ircd/Unreal3.2/src/ircd.c:1428: undefined reference to `tre_version' s_conf.o(.text+0x2d4a): In function `config_rehash': /home/ircd/Unreal3.2/src/s_conf.c:2205: undefined reference to `tre_regfree' s_conf.o(.text+0x2dae):/home/ircd/Unreal3.2/src/s_conf.c:2215: undefined reference to `tre_regfree' s_conf.o(.text+0x2e18):/home/ircd/Unreal3.2/src/s_conf.c:2225: undefined reference to `tre_regfree' s_conf.o(.text+0x3261):/home/ircd/Unreal3.2/src/s_conf.c:2330: undefined reference to `tre_regfree' Full output in the attachment. As a bonus, OpenBSD throws some warnings about using some functions that are apparently misused. Feel free to fix those as well, but they aren't show-stoppers. | ||||
Steps To Reproduce | - ./Config (The defaults lead to this result as well) - make - wait for the build to fail when linking | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
3rd party modules | |||||
|
What is the output of the following commands when run from within the Unreal3.2 directory? $ pkg-config --version $ pkg-config --static --libs extras/tre-0.8.0/tre.pc $ pkg-config --static --libs extras/tre-0.8.0/tre.pc | sed -e 's,-L\([^ ]\+lib\) -ltre,\1/libtre.a,' Unreal's compilation scripts unfortunately depend on the last command working, and this is my best guess of what could cause TRE_LIBS to be defined to an empty string. |
|
$ pwd /home/ircd/Unreal3.2 $ pkg-config --version 0.21 $ pkg-config --static --libs extras/tre-0.8.0/tre.pc Package extras/tre-0.8.0/tre.pc was not found in the pkg-config search path $ pkg-config --static --libs extras/tre-0.8.0/tre.pc | sed -e 's,-L\([^ ]\+lib\) -ltre,\1/libtre.a,' Package extras/tre-0.8.0/tre.pc was not found in the pkg-config search path (The third step was redundant, but I added it for completeness' sake) |
|
oh, and I think that any whitespace printed by any of those commands may be significant. |
|
As you can see, the command fails rather badly anyway, so I'm not sure if that matters too much. |
|
Did you run these commands after freshly unpacking the tarball or after compiling unrealircd? I intended them to be run after the failed compilation (I'm sorry I didn't say so earlier). If you ran these commands after freshly unpacking the tarball, the error makes sense -- and please run them again for me after running ./Config first. If elsewise, then please check if the file extras/tre-0.8.0/tre.pc exists or not. If it doesn't, then there's some problem compiling TRE -- whose compilation output you might attach. If that file exists, then I wonder why I can't produce the problem with a pkg-config-0.21 on my GNU system :-/. About my note about whitespace, I posted it before seeing your new post because I forgot to refresh the page -- sorry for that too. IDK, I hope that I covered everything in the complex and rambling blurb above ;-). |
|
The commands were done after the compilation. $ file extras/tre-0.8.0/tre.pc extras/tre-0.8.0/tre.pc: ASCII text The file clearly exists. |
|
I made the following commit to CVS. I'm guessing that there is either some strange bug with your version of pkg-config or some strange interaction with piping the output of pkg-config through my sed expression. Whatever the case, there _is_ code in ./configure which is run when pkg-config is not available. I made it so that this extra ``run when pkg-config isn't available'' code is also run when the TRE_LIBS is variable is set to an empty string, which should fix your compilation issue when you're using the bundled version of TRE. Please report whether or not this fixes your issue so I may mark the bug resolved :-). - Fix bundled TRE compilation error on OpenBSD with pkg-config-0.21 where pkg-config can't find 'tre.pc'. Reported by CuleX. (0003982) Also properly escape the sed expression used in the pkg-config call. As an alternative to using the bundled TRE in the first place, I personally recommend to install libtre into your system. Then just tell ./Config to pass --with-system-tre to ./configure and then you can link unrealircd against the system TRE (reducing the time it takes for ./configure to run because then TRE doesn't have to be compiled ;-)). Thanks again for the report and useful information! |
|
One doesn't always have access as root to install libtre, so fixing this bug is mandatory. Lastest CVS with your fix worked. |
|
Well, you could always install TRE into your home directory and compile unreal with LDFLAGS="-Wl,-rpath,${HOME}/lib" PKG_CONFIG_PATH="${HOME}/lib/pkgconfig" and --with-system-tre. That wouldn't require root access :-p. (Though I suppose people would want to replace ${HOME} with ${HOME}/tre or ${HOME}/unreal-libs). |
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-22 17:44 | CuleX | New Issue | |
2010-12-22 17:44 | CuleX | File Added: config.log_plus_make_output.log | |
2010-12-22 18:30 | ohnobinki | Note Added: 0016486 | |
2010-12-22 18:30 | ohnobinki | Assigned To | => ohnobinki |
2010-12-22 18:30 | ohnobinki | Status | new => assigned |
2010-12-22 18:34 | CuleX | Note Added: 0016487 | |
2010-12-22 18:47 | ohnobinki | Note Added: 0016488 | |
2010-12-22 20:11 | CuleX | Note Added: 0016489 | |
2010-12-23 04:50 | ohnobinki | Note Added: 0016491 | |
2010-12-23 17:32 | CuleX | Note Added: 0016494 | |
2010-12-24 03:38 | ohnobinki | Note Added: 0016504 | |
2010-12-24 03:38 | ohnobinki | Status | assigned => feedback |
2010-12-24 07:18 | CuleX | Note Added: 0016505 | |
2010-12-24 17:08 | ohnobinki | Status | feedback => resolved |
2010-12-24 17:08 | ohnobinki | Fixed in Version | => 3.2.9-RC2 |
2010-12-24 17:08 | ohnobinki | Resolution | open => fixed |
2010-12-24 17:13 | ohnobinki | Note Added: 0016506 |