Created
January 21, 2015 23:24
-
-
Save AubreyHewes/261748ad940a0be64f28 to your computer and use it in GitHub Desktop.
Compile and Install BitchX on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#################################################################################### | |
# | |
# Download Compile and Install BitchX on Ubuntu | |
# | |
#################################################################################### | |
# download bitchx source | |
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic) | |
DOWNLOAD_URL=$(curl -s http://bitchx.sourceforge.net |\ | |
grep "http://sourceforge.net" |\ | |
sed -e "s|.*href=\"||g" |\ | |
sed -e "s|\".*||g" |\ | |
grep "/download" | uniq) # should only be one | |
if [ "${DOWNLOAD_URL}" = "" ]; then | |
echo "ERROR: Could not find DOWNLOAD_URL from http://bitchx.sourceforge.net" | |
exit 255; | |
fi | |
# @todo make smarter, i.e. regexp, though now uses _always_ available commands (sic) | |
VERSION=$(echo ${DOWNLOAD_URL} | sed -e "s|.*ircii-pana/bitchx-||g" | sed -e "s|\/.*||g") | |
if [ "${VERSION}" = "" ]; then | |
echo "ERROR: Could not find VERSION from ${DOWNLOAD_URL}" | |
exit 255; | |
fi | |
echo "Will try to download and install version ${VERSION}"; | |
DOWNLOAD_URL=http://downloads.sourceforge.net/project/bitchx/ircii-pana/bitchx-${VERSION}/bitchx-${VERSION}.tar.gz | |
echo "Downloading: ${DOWNLOAD_URL}" | |
curl -L -s "${DOWNLOAD_URL}" -o bitchx-${VERSION}.tar.gz | |
# install required dev libraries | |
sudo apt-get install libssl-dev ncurses-dev | |
# unpack source | |
tar -xzf bitchx-${VERSION}.tar.gz | |
# go to source dir | |
cd bitchx-${VERSION} | |
# configure | |
./configure --prefix=/usr --with-ssl --with-plugins --enable-ipv6 | |
# build | |
make | |
# install (change to "make install_local" for local installation; in your own $HOME) | |
sudo make install | |
# remove src + build | |
cd $OLDPWD && rm -rf bitchx-${VERSION}* | |
# done use "BitchX" to run... |
how the heck did you fix it?
The fix is pretty easy:
--- commands.c 2014-11-04 05:54:23.000000000 -0500
+++ commands.c 2023-10-31 08:34:17.876041504 -0400
@@ -118,7 +118,7 @@
static void oper_password_received (char *, char *);
-int no_hook_notify = 0;
+// int no_hook_notify = 0;
int load_depth = -1;
extern char cx_function[];
--- modules.c 2010-06-26 04:18:34.000000000 -0400
+++ modules.c 2023-10-31 08:23:31.312250180 -0400
@@ -83,7 +83,7 @@
extern int (*dcc_input_func) (int, int, char *, int, int);
extern int (*dcc_close_func) (int, unsigned long, int);
-int (*serv_open_func) (int, unsigned long, int);
+int (*serv_open2_func) (int, unsigned long, int);
extern int (*serv_output_func) (int, int, char *, int);
extern int (*serv_input_func) (int, char *, int, int, int);
extern int (*serv_close_func) (int, unsigned long, int);
@@ -631,7 +631,7 @@
global_table[USERHOSTBASE] = (Function_ptr) BX_userhostbase;
- global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open_func;
+ global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open2_func;
global_table[SERV_OUTPUT_FUNC] = (Function_ptr) &serv_output_func;
global_table[SERV_INPUT_FUNC] = (Function_ptr) &serv_input_func;
global_table[SERV_CLOSE_FUNC] = (Function_ptr) &serv_close_func;
The fix is pretty easy:
--- commands.c 2014-11-04 05:54:23.000000000 -0500 +++ commands.c 2023-10-31 08:34:17.876041504 -0400 @@ -118,7 +118,7 @@ static void oper_password_received (char *, char *); -int no_hook_notify = 0; +// int no_hook_notify = 0; int load_depth = -1; extern char cx_function[]; --- modules.c 2010-06-26 04:18:34.000000000 -0400 +++ modules.c 2023-10-31 08:23:31.312250180 -0400 @@ -83,7 +83,7 @@ extern int (*dcc_input_func) (int, int, char *, int, int); extern int (*dcc_close_func) (int, unsigned long, int); -int (*serv_open_func) (int, unsigned long, int); +int (*serv_open2_func) (int, unsigned long, int); extern int (*serv_output_func) (int, int, char *, int); extern int (*serv_input_func) (int, char *, int, int, int); extern int (*serv_close_func) (int, unsigned long, int); @@ -631,7 +631,7 @@ global_table[USERHOSTBASE] = (Function_ptr) BX_userhostbase; - global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open_func; + global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open2_func; global_table[SERV_OUTPUT_FUNC] = (Function_ptr) &serv_output_func; global_table[SERV_INPUT_FUNC] = (Function_ptr) &serv_input_func; global_table[SERV_CLOSE_FUNC] = (Function_ptr) &serv_close_func;
This worked for me!
To any other zoomers seeing this thread after getting a error such as the one below:
gmake[1]: *** [Makefile:183: BitchX] Error 1
gmake[1]: Leaving directory '/home/marcello/Downloads/bitchx-1.2.1/source'
make: *** [Makefile:196: BitchX] Error 2
If you're also confused, you gotta use the attached text file.
Remove this line from source/commands.c:
int no_hook_notify = 0;
And replace with this:
// int no_hook_notify = 0;
(Just a comment for record keeping, I guess)
Then, remove these lines from source/modules.c:
int (*serv_open_func) (int, unsigned long, int);
global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open_func;
And replace with these lines, respectively:
int (*serv_open2_func) (int, unsigned long, int);
global_table[SERV_OPEN_FUNC] = (Function_ptr) &serv_open2_func;
After all that's done (make sure to write your changes), just run make clean
and then sudo make install
, and you should be good!
P.S. I don't actually understand how this fixes the issue, fully, but I figured I'd leave a tutorial for the next guy.
Hope this helps!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Ha, well this is a very old docker example. Could be done much easier these days. Nice to know people found it ;-)
NOTE: is outdated (8 years)