cryptodotis / irssi-otr

LibOTR functionality in Irssi.
GNU General Public License v2.0
183 stars 24 forks source link

missing common.h file #40

Open spiralz opened 10 years ago

spiralz commented 10 years ago

common.h file appears to be missing. after ./bootstrap && ./configure --prefix="/usr" the following error is generated:

$ make
Making all in help
make[1]: Nothing to be done for `all'.
Making all in src
  CC       otr-formats.lo
clang: warning: -Wl,-z,relro,-z,now: 'linker' input unused
In file included from otr-formats.c:21:
In file included from ../src/otr.h:31:
../src/irssi-otr.h:27:10: fatal error: 'src/common.h' file not found
#include <src/common.h>
         ^
1 error generated.
make[1]: *** [otr-formats.lo] Error 1
make: *** [all-recursive] Error 1```
DrWhax commented 10 years ago

Hm, clang, I guess we don't support that at the moment..

dgoulet commented 10 years ago

This is a file that is from "irssi-dev" package. I feel there is an issue with the include path and clang because if you got to the make process it means the configure found irssi dev headers.

capi commented 10 years ago

I just started with experimenting with building irssi, libotr, and irssi-otr from source. I encountered the same include problem. I am using the script below to modify some of the build scripts to get around the problem, maybe this will help you as well.

#!/bin/bash
set -e
set -x

IRSSI_SRC="irssi-0.8.16-rc1"
IRSSI_TAR="${IRSSI_SRC}.tar.gz"
IRSSI_ROOT="$HOME/irssi"
IRSSI="${IRSSI_ROOT}/bin/irssi"

LIBOTR_SRC="otr-libotr"

IRSSI_OTR_SRC="irssi-otr"
IRSSI_OTR_GIT="https://github.com/cryptodotis/irssi-otr.git"

sudo apt-get install libglib2.0-dev libperl-dev libgcrypt11-dev

##############
### IRSSI ####
##############

if [ ! -e "$IRSSI" ]; then

  if [ ! -e "$IRSSI_TAR" ]; then
    wget http://www.irssi.org/files/"$IRSSI_TAR"
  fi
  if [ ! -e "$IRSSI_SRC" ]; then
    tar xzf "$IRSSI_TAR"
  fi
  cd "$IRSSI_SRC"
  if [ ! -e Makefile ]; then
    ./configure --prefix="$HOME/irssi" --with-perl --with-proxy
    read -t 3 || true
  fi
  make -j
  make install
  cd ..
fi

##############
### LIBOTR ###
##############

if [ ! -e "$LIBOTR_SRC" ]; then
  git clone git://git.code.sf.net/p/otr/libotr otr-libotr
fi
cd "$LIBOTR_SRC"
if [ ! -e "configure" ]; then
  autoreconf -s -i
  ./configure --prefix="$IRSSI_ROOT"
fi
make
make install
cd ..

#################
### IRSSI-OTR ###
#################

if [ ! -e "$IRSSI_OTR_SRC" ]; then
  git clone "$IRSSI_OTR_GIT"
fi
cd "$IRSSI_OTR_SRC"
if [ ! -e configure ]; then
  ./bootstrap
  sed -i "s%IRSSI_DIST=.*%IRSSI_DIST=${IRSSI_ROOT}/include/irssi%g" src/Makefile.am
  sed -i "s%helpdir = .*%helpdir = ${IRSSI_ROOT}/share/irssi/help%g" help/Makefile.am
  sed -i "s%IRSSI_MODULE_DIR=.*%IRSSI_MODULE_DIR=${IRSSI_ROOT}/lib/irssi/modules%g" configure.ac
  ./configure --prefix="$IRSSI_ROOT" --with-libotr-inc-prefix="$IRSSI_ROOT/include" --with-libotr-prefix="$IRSSI_ROOT/lib" --with-irssi-headers="$IRSSI_ROOT/include/irssi"
fi
make clean
make
make install
cd ..
stiadmin commented 9 years ago

Also having this problem. Would love to see a resolution or a know working work around.

WouterSioen commented 8 years ago

+1 (install on osx)

DrWhax commented 8 years ago

so this problem exists on MacOSX and other *BSD's?

WouterSioen commented 8 years ago

I guess so. Clang is the default compiler for Mac OS X, so I guess this is the problem.

JohnCanty commented 8 years ago

I just ran into this as well. Would love to get this working.

WouterSioen commented 8 years ago

@dgoulet any news on this? (I'm using irssi 0.8.17 on mac OS X Yosemite 10.10.5)

hanshasselberg commented 8 years ago

I am running into this as well. I installed irssi with brew install irssi --HEAD. I got a little bit further by doing the following:

  1. remove -z,relro,-z,now from configure.ac because -z is not support in osx.
  2. clone irssi somewhere
  3. copy some irssi header files to root irssi dir: cp src/*.h . and cp src/irssi/*.h .
  4. back to irssi-otr to ./configure --prefix="/usr/local" --with-irssi-headers=~/src/github.com/irssi/irssi
  5. make

For me it builds now. I am aware that this is not pretty. Unfortunately sudo make install fails now. I am not sure how to install manually, shouldn't be a big deal though.

hanshasselberg commented 8 years ago

ok, providing a destdir got me further:

$ make install DESTDIR=$(pwd)/destdir
$ find destdir
destdir
destdir/usr
destdir/usr/lib
destdir/usr/lib/irssi
destdir/usr/lib/irssi/modules
destdir/usr/lib/irssi/modules/libotr.so
destdir/usr/share
destdir/usr/share/irssi
destdir/usr/share/irssi/help
destdir/usr/share/irssi/help/otr
hanshasselberg commented 8 years ago

I copied destdir/usr/lib/irssi/modules/libotr.so to ~/.irssi/modules and tried to load it with /load otr: Irssi: otr/otr is ABI version 0 but Irssi is version 1, cannot load

hanshasselberg commented 8 years ago

I added the irssi abi check to src/otr.c:

void otr_abicheck(int *version)
{
  *version = 1;
}

recompiled and now I can load it.

saper commented 7 years ago

Make sure you point configure to a directory with irssi headers - the one with irssi-config.h irssi-version.h src.

For me (FreeBSD) --with-irssi-headers=/usr/local/include/irssi was enough.