Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

problems installing openchange

Has anyone successfully installed OpenChange on Linux? I am running Slackware distro 14.1, kernel version 3.10.17. I have successfully installed Samba4 (4.1.0) and have configured a working DC/AD with redirected folders.

I am having serious problems trying to install openChange on this system. First, when I try to `make samba` from the openChange build (in order to create necessary libraries) I get the error:
Checking getconf LFS_CFLAGS                : -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Checking getconf large file support flags work : not found
Checking for large file support without additional flags : not found
Checking for -D_FILE_OFFSET_BITS=64                      : not found
Checking for -D_LARGE_FILES                              : not found
Samba requires large file support support, but not available on this platform: sizeof(off_t) < 8
Error in lib/talloc configure (error code 1)
make: *** [samba] Error 1

Open in new window

I am positively certain this "large file support ... not available on this platform" is wrong. I've formatted a 2TB ext4 partition using "-T largefiles". If there's something else that defines a large file system, I don't know what. I don't quite know what the message "Checking for -D_LARGE_FILES" means, but I've found no where to set these compile option in the makefile.

My next problem is trying to build openchange. I've set the requisite environment variables:

export PKG_CONFIG_PATH=/usr/local/samba/lib/pkgconfig:/usr/lib/pkgconfig
export BOOST_LIB_SUFFIX="-mt"
export PATH=$PATH:/usr/local/samba/bin
export PYTHONPATH=$PYTHONPATH:/usr/local/samba/lib/python2.7/site-packages

run the autogen.sh program (no errors), then `./configure --prefix=/usr/local/samba`. This fails. In the config.log file is:
In file included from /usr/include/stdio.h:27:0,
                 from conftest.c:12:
/usr/include/features.h:375:25: fatal error: sys/cdefs.h: No such file or directory
 #  include <sys/cdefs.h>
                         ^
compilation terminated.
configure:3793: $? = 1
configure:3800: ./conftest
./configure: line 3802: ./conftest: No such file or directory
configure:3804: $? = 127
configure:3811: error: in `/user/util/src/openchange-2.1-QUADRANT':
configure:3813: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

Open in new window

There is, in fact, no /usr/include/sys/cdefs.h. Linking the one from /usr/include/unistring/cdefs.h doesn't work.

I haven't been able to find any kind of resolution to these problems any where. Has any one else experienced and figured this out?

I've tried everything I can think of and am about to look for an alternative other than openChange. I'm beginning to conclude that it's not ready for prime time.
This error is the subject of another EE question, but not in the context of openChange.
Avatar of rindi
rindi
Flag of Switzerland image

I would suggest, instead of building this yourself on slackware, to rather use Zentyal, which is an Ubuntu server based Server distribution with a free community version. It comes with a modular build where you can select the different functions you want to install. Included are Samba 4/Ldap with Active Directory/DC functionality. Also included is OpenChange. It generally works well, and it uses a web-based management interface, so it is also easy to maintain.

http://distrowatch.com/table.php?distribution=zentyal
Is this Slackware64? These flags are not required there. Possibly the OpenChange build script only works on 32-bit systems.
Do you get the same results as I do below?
20:57:29$ getconf LFS_CFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
20:57:37$ 

Open in new window

Avatar of Mark
Mark

ASKER

rindi: I may go the Zentyal route if all else fails, but the whole dhcpd/dns/Samba4-DC/AD/redirected folders thing went in like a snap and worked like a charm immediately with no fuss on Slackware. I am loath to start over, esp. since I did get the DC/AD working on Debian, but couldn't do Windows Updates or Remote Desktop Access on WIN7 connected workstations with the Domain Controller also acting as the router/firewall. Ubuntu is basically a varietal of Debian.

Duncan Roe: > Is this Slackware64?

This is a 64 bit CPU: Intel Pentium G620, but I  believe I have 32bit Linux installed. I do have the 'lm' flag set in /proc/cpuinfo, but getconf LONG_BIT = 32; uname -m = i686. Also:
$ lscpu
Architecture:          i686
CPU op-mode(s):        32-bit, 64-bit

Open in new window

I get the same thing as you for getconf LFS_CFLAGS
$ getconf LFS_CFLAGS
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

Open in new window

Note that in the first several lines of the `make samba` output in my original posting it says:
Checking getconf LFS_CFLAGS                : -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
Checking getconf large file support flags work : not found
Checking for large file support without additional flags : not found
Checking for -D_FILE_OFFSET_BITS=64                      : not found
Checking for -D_LARGE_FILES                              : not found

Open in new window

So, it does find the flags set (line 1), but then says "not found" for "getconf large file support flags work". Meaning what? It doesn't think they work?

The odd thing is, the openchange worked fine before I had a disk crash, so I know it's doable. But I don't know what I'm doing differently this time round.
I think you are missing some file, maybe a header, maybe a program, or maybe something else. You need to check in detail how the test failed: I think it's in config.log but use ls -Alt after ./configure to verify.
Avatar of Mark

ASKER

Since I already have a working samba, I decided to move on to building the openChange program(s). However, I get a fatal error in the ./configure:
configure:3781: checking whether we are cross compiling
configure:3789: gcc -o conftest -I. -g   conftest.c  >&5
In file included from /usr/include/stdio.h:27:0,
                 from conftest.c:12:
/usr/include/features.h:375:25: fatal error: sys/cdefs.h: No such file or directory
 #  include <sys/cdefs.h>
                         ^
compilation terminated.
configure:3793: $? = 1
configure:3800: ./conftest
./configure: line 3802: ./conftest: No such file or directory
configure:3804: $? = 127
configure:3811: error: in `/user/util/src/openchange-2.1-QUADRANT':
configure:3813: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

Open in new window

the header file sys/cdefs.h does not exist on my Slackware distro, nor does it exist on my Debian distro. I've search all the Slackware source repositories and no sys/cdefs.h. Nor does linking /usr/include/unistring/cdefs.h to /usr/include/sys/cdefs.h work.

I guess I'm going to conclude that the openChange download had only been ported to some specific platform and is not ready for what I want to do. I'm going to give Zentyl a shot and see if that works better.
I have /usr/include/sys/cdefs.h on my Slackware 14.1 32-bit installation. It is supplied by package glibc-2.17-i486-7. I would check your glibc revision
11:06:05$ /lib/libc.so.6 --version
GNU C Library (GNU libc) stable release version 2.17, by Roland McGrath et al.
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.1.
Compiled on a Linux 3.10.12 system on 2013-09-15.
Available extensions:
        crypt add-on version 2.1 by Michael Glad and others
        GNU Libidn by Simon Josefsson
        Native POSIX Threads Library by Ulrich Drepper et al
        BIND-8.2.3-T5B
libc ABIs: UNIQUE IFUNC
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
11:06:38$ 

Open in new window

Assuming you see the same version, you  can install the missing file as below (assuming you loopback-mount the Slackware DVD to /mnt/iso):
upgradepkg --reinstall /mnt/iso/slackware/l/glibc-2.17-i486-7.txz
Avatar of Mark

ASKER

Duncan Roe: interesting that you have cdefs.h. I wonder what else I'm missing. What slackware distro are you using?
14.1 - from ftp://ftp.slackware.com/pub/slackware/slackware-current/slackware/. Try this
07:45:22$ cd /var/log/packages
07:50:48$ grep cdefs.h *
dev86-0.16.17-i486-1:usr/lib/bcc/include/sys/cdefs.h
glibc-2.17-i486-7:usr/include/sys/cdefs.h
libunistring-0.9.3-i486-1:usr/include/unistring/cdefs.h
openldap-client-2.4.31-i486-2:usr/include/ldap_cdefs.h
seamonkey-2.21-i486-1:usr/include/seamonkey-2.21/dbm/cdefs.h
07:51:15$ 

Open in new window

You should see the same, provided you did a complete install or upgrade
"but the whole dhcpd/dns/Samba4-DC/AD/redirected folders thing went in like a snap"

That is the same with Zentyal. Actually there's hardly anything you need to do as a lot of the configuration/setup is automated.
I wonder what else I'm missing Really, there is no way to know. Regardless of how you proceed, you have a broken system right now.
If it were convenient, a full Slackware reinstall would be the best thing to do.
That hasn't been convenient for me any time this century though, and I imagine your situation may be similar. You can instead do a re-install: work through each directory in the install iso (a/, ap/, d/, e/ and so on) and in each do upgradepkg --reinstall *.t?z.
(That's how I upgrade Slackware versions, except I don't then use --reinstall)
Avatar of Mark

ASKER

rindi: I did download the Zentyl CD and started to install it. The issue is that I have a bit of a non-standard NIC setup. I have 2 NICs, one Internet connected and one LAN connected. I want the configuration to use the LAN NIC. I did have a bit of an issue when provisioning Samba4 myself in that it wants to grab the Internet NIC. I was able to override that, but Zentyl looks like it too needs post-tweaking in that regard. I'll keep this in reserve for later as I've nearly got the OpenChange set up.

Duncan Roe: > If it were convenient, a full Slackware reinstall would be the best thing to do. ...

Well, I figured out my screw up. Your posting indicating that you had the cdefs.h file in /usr/include/sys got me to investigating. The problem was that I was backing up my system with:

tar --exclude proc --exclude sys ...

Which I found out excludes *any* so-named files and directories anywhere in the hierarchy. So, when I restored the drive, all the headers in /usr/include/sys were missing and God knows what else. What I should have used was:

tar --exclude /proc --exclude /sys ...

Consequently, I decided to go ahead and do a distro re-install which, as it turns out, left all my mucking about intact including /etc/passwd, /etc/group, config files, etc. Like you, I tend to never upgrade Slackware and just snag a new distro when I need to build a machine. Given this "upgrade" experience,  maybe doing an upgrade wouldn't be so painful for you after all. This is a test platform so I didn't have any extra packages installed.

With a complete system, I was able to do the `make samba` more-or-less successfully! Yeah. I say "more-or-less" because it failed to compile the actual samba executable with the error:

Build failed: ABI for libndr.so has changed - please fix library version then build with --abi-update

but I believe I had that same error when I got it running the first time too. Since I'm using the as-shipped samba, I don't think I care about this error. The necessary samba libraries did get built.

But now I have another problem that I'm sure can be solved one way or another. I decided to go ahead and install the 64bit Slackware distro. However, when I do the `make` for OpenChange, I get the errors shown below: "skipping incompatible".

Note that the libs in the referenced /usr/lib directory are ELF 32-bit while the same-named files in /usr/lib64 are ELF 64-bit.

I can probably solve this by re-installing the 32bit OS, but do you know of something I can do other that that extreme? I've tried renaming /var/lib64 to /var/lib, but that didn't work (though I didn't reboot after doing that). I also did `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib64/` but that didn't help either.

What do you think?
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libdcerpc.so when searching for -ldcerpc
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libdcerpc-binding.so when searching for -ldcerpc-binding
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libndr.so when searching for -lndr
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libsamba-hostconfig.so when searching for -lsamba-hostconfig
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libsamba-util.so when searching for -lsamba-util
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libsamba-credentials.so when searching for -lsamba-credentials
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libical.so when searching for -lical
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libicalss.so when searching for -licalss
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libicalvcal.so when searching for -licalvcal
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpopt.so when searching for -lpopt
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libpopt.a when searching for -lpopt
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/lib64/gcc/x86_64-slackware-linux/4.8.2/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgcc_s.so when searching for -lgcc_s

Open in new window

In Zentyal you can select which NIC is external and which internal, and Samba will automatically use the internal NIC(s), if I'm not mistaken it refuses to install when you only have setup an External NIC. It needs the Internal NIC and Samba will only work for internal NICs. Besides that, it includes a so called "Gateway" set of modules, which makes it easy to set it up as an internet gateway and proxy server.
Avatar of Mark

ASKER

rindi: Hmmm, interesting. I tried the community version to start with. Are you talking about the Commercial version? The community version showed me both NICs and asked me to choose which one (a bit frustrating right there because it listed by manufacture, not by MAC, and both cards are the same manufacturer -- so I guessed). After selecting the NIC, it took it from there. It tried, without asking, to set up DHCP for the card, and only when that failed did it permit me to do a manual setup. Nothing about the 2nd card was ever requested.

Perhaps one difference between the Community and Commercial versions?
I only use the free community version. As far as I know the commercial version is the same. The main difference is you get support.
The skipping incompatible messages are not error in themselves. What would be an error is if a compatible library is not found in /usr/lib64. For example /usr/lib64/libdcerpc.so should be a symbolic link pointing to libdcerpc.so.0.0.1 (i.e. in /usr/lib64) which should be a 64-bit library.
LD_LIBRARY_PATH is irrelevant here. We are talking about ld, not ld-linux.so
Avatar of Mark

ASKER

rindi: I will revisit Zentyal in future, but like I said, I was nearly done installing samba and OpenChange myself before I came across Zentyal. Interesting that my installation experience with the NICs was different than yours. It did let me install to the external NIC and, in fact, never dealt with the other NIC after that. I'll have to check it out again. As I think I mentioned, I did try installing samba4 DC/AD with Debian on a host that was also the firewall router. The DC/AD part worked fine, but I could not get to the WIN7 clients via RDC (XP clients weren't a problem), and the WIN7 MS Updates wouldn't work either. Re-implementing with Slackware solved that problem. That also makes me a little hesitant with Zentyal. Have you tried RDC to WIN7 clients with your setup?

Duncan Roe: > The skipping incompatible messages are not error in themselves.

Really? So you think the targets did get built? I guess I didn't actually check to see if the make succeeded. I assumed it was skipping that target.

In any case I renamed /usr/lib to /usr/lib32 and linked /usr/lib64 to /usr/lib and rebooted. That got rid of the "incompatible" messages and doesn't seem to have had any other adverse effects. I'll try renaming thing back and doing the build again and see if the targets get made.

I'd be interested in your comments on this.

Anyway, I am finally back to where I was and can continue. The tar --exclude problem was the culprit as it failed to save header files as well as sub-directories in the openchange build directory. What a mess! There were a couple of gotchas I'll list below for future edification:

1. The 64-bit library issue may not have been an actual problem, according to Duncan Roe.

2. I followed the howto in: openchange-2.1-QUADRANT/doc/howto.txt. The `make samba` failed at the end with:
Build failed: ABI for libndr.so has changed - please fix library version then build with --abi-update
See http://wiki.samba.org/index.php/Waf#ABI_Checking for more information
If you have not changed any ABI, and your platform always gives this error, please configure with --abi-check-disable to skip this check

Open in new window

I wasn't exactly sure how to fix this (there was no "configure" to run before doing the make, so I didn't know what to do with `configure with --abi-check-disable`), so I just left it there. It did successfully create the needed samba libraries and put them in the newly created /usr/local/samba/lib. Since I already had a working Samba 4.1.0 in the as-shipped distro, I didn't really care about creating a new samba binary.

2. Per the howto, I added these new libraries to /etc/ld.so.conf, set some environment variables and successfully built openchange:
$ echo /usr/local/samba/lib >>/etc/ld.so.conf
$ ldconfig -v

$ export PATH=$PATH:/usr/local/samba/bin
$ export PKG_CONFIG_PATH=/usr/local/samba/lib/pkgconfig:$PKG_CONFIG_PATH

$ ./autogen.sh
$ ./configure --prefix=/usr/local/samba
$ make
$ make install

Open in new window

In order for the recommended test `openchangeclient --help` to run, I had to symlink a couple of missing libraries. This may have been due to my samba make not running to completion and they would have been possibly symlinked later:
$ cd /usr/local/samba/lib
$ ln -s libmaip.so.2.0 libmapi.so.0
$ ln -s libocpf.so.2.0 libocpf.so.0

Open in new window

The timestamps on my make output files show that it took a bit over 2 minutes to make samba, configure and make openchange and the only real tweak I had to do was symlinking the missing libraries.

So far, the documented tests are working, but I am far from done with this project. I've not yet tried configuring real users or connecting with an Outlook client, but at least I'm back to where I was before the drive crash and I've learned an important lesson about tar!
In any case I renamed /usr/lib to /usr/lib32 and linked /usr/lib64 to /usr/lib and rebooted
That breaks your hybrid installation for most 32-bit programs. It would also break any future package installs (32 or 64)
Do you really need a hybrid (32/64-bit) installation anyway? They are a little more work to manage than straight 32- or 64-bit.
Avatar of Mark

ASKER

Duncan Roe: > Do you really need a hybrid (32/64-bit) installation anyway?

I don't think I need a hybrid installation, but I didn't exactly ask for that. Not sure how I would change this, advice?

Anyway, I renamed the directories back the way they were. I assume from your comment, "The skipping incompatible messages are not error in themselves", that they would have built just fine had a left things alone and not panicked with the "skipping incompatible" messages. I did not start over to see if the files built with the originally-named directories. You are saying they would have, right?
Sounds to me like you installed Slackware64 on top of a Slackware system. So now you have a mess^H^H^H^Hhybrid. Likely you have mostly 64-bit executables now, which will have overwritten their 32-bit counterparts. Uninstalling the 32-bit packages is thus not an option because that will delete the 64-bit executables since they have the same names as 32-bit (as do libraries, but they're kept in different directories).
Put all the names back as they were. Your build would have been fine.
Avatar of Mark

ASKER

> Sounds to me like you installed Slackware64 on top of a Slackware system.

Yes, that's exactly what I did. I also did `slackpkg update` and `slackpkg upgrade-all` which seems to have hosed things further. For example, when I try `samba-tool user list` I get:
ldb: module version mismatch in ../source4/dsdb/samdb/ldb_modules/acl.c : ldb_version=1.1.16 module_version=1.1.17
ldb: failed to initialise module /usr/lib64/ldb/acl.so : Unavailable
ldb: WARNING: Module [samba_secrets] not found - do you need to set LDB_MODULES_PATH?
ldb: Unable to load modules for /etc/samba/private/secrets.ldb: (null)
WARNING: Module [samba_dsdb] not found - do you need to set LDB_MODULES_PATH?
Unable to load modules for tdb:///etc/samba/private/sam.ldb: (null)
ERROR(ldb): uncaught exception - None
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/__init__.py", line 175, in _run
    return self.run(*args, **kwargs)
  File "/usr/lib64/python2.7/site-packages/samba/netcmd/user.py", line 265, in run
    credentials=creds, lp=lp)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 56, in __init__
    options=options)
  File "/usr/lib64/python2.7/site-packages/samba/__init__.py", line 114, in __init__
    self.connect(url, flags, options)
  File "/usr/lib64/python2.7/site-packages/samba/samdb.py", line 71, in connect
    options=options)

Open in new window

whereas this used to work. Perhaps I should just start over with a clean install of Slackware?
Yes, I was going to suggest that in a post but couldn't locate this Q again. Save off your data, back up the remaining partition to cover whatever you missed, and do a clean install.
Hi Mark,

This question is showing as Abandoned now. But you have the answer - please accept and close.

-Duncan.
ASKER CERTIFIED SOLUTION
Avatar of Duncan Roe
Duncan Roe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

Duncan Roe: Yes, I've reinstalled Slackware64 from scratch and run 'update' immediately after installation. I am now in the process of reconfiguring everything for samba4 DC/AD; and will eventually get back to OpenChange. Will create new questions if I have problems at that point.