Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

missing common.h file #40

Open
spiralz opened this issue Mar 1, 2014 · 14 comments
Open

missing common.h file #40

spiralz opened this issue Mar 1, 2014 · 14 comments
Labels

Comments

@spiralz
Copy link

spiralz commented Mar 1, 2014

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 DrWhax added the Bugs label Mar 5, 2014
@DrWhax
Copy link
Member

DrWhax commented Mar 5, 2014

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

@dgoulet
Copy link
Member

dgoulet commented Mar 5, 2014

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
Copy link

capi commented Mar 5, 2014

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
Copy link

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

@WouterSioen
Copy link

+1 (install on osx)

@DrWhax
Copy link
Member

DrWhax commented Oct 21, 2015

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

@WouterSioen
Copy link

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

@JohnCanty
Copy link

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

@WouterSioen
Copy link

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

@hanshasselberg
Copy link

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
Copy link

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
Copy link

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
Copy link

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

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

recompiled and now I can load it.

hanshasselberg added a commit to hanshasselberg/irssi-otr that referenced this issue Jan 17, 2016
The ABI check was introduced with
irssi/irssi#363 and if not provided the module
will to load.

I stumbled over this while trying to get it running on OSX with irssi
build from master (cryptodotis#40).
@saper
Copy link

saper commented Oct 22, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

9 participants