Error compiling abyss 1.5.2: Semaphore.h: 'sem_t' does not name a type

2,041 views
Skip to first unread message

Lee Reynolds

unread,
Jul 18, 2014, 1:15:42 AM7/18/14
to abyss...@googlegroups.com
I'm trying to compile abyss 1.5.2 on Centos 6.5 with Openmpi 1.8.1.

I get the following error stream:

Making all in KAligner
make[2]: Entering directory `/packages/build/abyss/abyss-1.5.2/KAligner'
g++ -DHAVE_CONFIG_H -I. -I..  -I.. -I../Common -I../DataLayer -I/packages/build/abyss/abyss-1.5.2 -isystem/packages/boost/1.55-gcc-stock/include -isystem/packages/openmpi/1.8.1/gcc/4.7.7/normal/include   -isystem/packages/build/abyss/abyss-1.5.2/boost_1_55_0 -Wall -Wextra -Werror -g -O2 -MT KAligner-KAligner.o -MD -MP -MF .deps/KAligner-KAligner.Tpo -c -o KAligner-KAligner.o `test -f 'KAligner.cpp' || echo './'`KAligner.cpp
In file included from Pipe.h:4,
                 from KAligner.cpp:12:
Semaphore.h:93: error: \u2018sem_t\u2019 does not name a type
Semaphore.h: In constructor \u2018Semaphore::Semaphore(unsigned int)\u2019:
Semaphore.h:58: error: \u2018m_sem\u2019 was not declared in this scope
Semaphore.h:58: error: \u2018sem_init\u2019 was not declared in this scope
Semaphore.h: In destructor \u2018Semaphore::~Semaphore()\u2019:
Semaphore.h:67: error: \u2018m_sem\u2019 was not declared in this scope
Semaphore.h:67: error: \u2018sem_destroy\u2019 was not declared in this scope
Semaphore.h: In member function \u2018void Semaphore::wait()\u2019:
Semaphore.h:76: error: \u2018m_sem\u2019 was not declared in this scope
Semaphore.h:76: error: \u2018sem_wait\u2019 was not declared in this scope
Semaphore.h: In member function \u2018void Semaphore::post()\u2019:
Semaphore.h:85: error: \u2018m_sem\u2019 was not declared in this scope
Semaphore.h:85: error: \u2018sem_post\u2019 was not declared in this scope
make[2]: *** [KAligner-KAligner.o] Error 1
make[2]: Leaving directory `/packages/build/abyss/abyss-1.5.2/KAligner'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/packages/build/abyss/abyss-1.5.2'
make: *** [all] Error 2

Apparently it is unhappy about line # 93 in ./abyss-1.5.2/KAligner/Semaphore.h

sem_t m_sem;

sem_t seems to be defined in /usr/include/semaphore.h

This same package compiles just fine on Centos 5.10 with openmpi 1.7.2 and gcc 4.4.7




Anthony Raymond

unread,
Jul 18, 2014, 4:44:15 PM7/18/14
to Lee Reynolds, abyss...@googlegroups.com
Hi Lee,

I just installed a fresh Centos 6.5 VM and ran the following:
sudo yum update
sudo yum install autoconf automake gcc gcc-c++

and then followed the instructions on our readme to compile ABySS from source (no openMPI, which isn't used by KAligner, but I did use boost-1.55.0). I didn't get this error.

Please send me the output of:
gcc -v
g++ -v
uname -a

Thanks,
Tony

--
You received this message because you are subscribed to the Google Groups "ABySS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to abyss-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lee Reynolds

unread,
Jul 19, 2014, 1:45:22 AM7/19/14
to abyss...@googlegroups.com, leebre...@gmail.com
My installation of centos 6.5 is fully up to date as well.

gcc -v :

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

g++ -v:  

Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)

uname -a : 

Linux ichn1 2.6.32-431.20.3.el6.x86_64 #1 SMP Thu Jun 19 21:14:45 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

I'm using the environment modules system to activate boost 1.55.0.  Here are the environment variables set int the boost 1.55.0 package:

prepend-path CFLAGS          "-I/packages/boost/1.55-gcc-stock/include"
prepend-path INCLUDE         "/packages/boost/1.55-gcc-stock/include"
prepend-path LDFLAGS         "-L/packages/boost/1.55-gcc-stock/lib"
prepend-path LD_LIBRARY_PATH /packages/boost/1.55-gcc-stock/lib


I've also tried compiling abyss with gcc 4.90 and 4.91, with boost and openmpi packages compiled for each version respectively.  All give the same exact error.  I don't think this is a compiler issue.  Might be something I've done wrong, or something wrong in my environment.

Here are the important parts of the build script that I've used for abyss:

module load boost/1.55-gcc-stock
module load openmpi/1.8.1-gcc-stock

./configure \
    --prefix=/packages/abyss/$PACKAGENAME \
    --with-boost=/packages/boost/1.55-gcc-stock/include \
    --with-mpi=/packages/openmpi/1.8.1/gcc/4.7.7/normal

make

Thanks for your help.

Lee Reynolds

unread,
Jul 19, 2014, 2:04:01 AM7/19/14
to abyss...@googlegroups.com, leebre...@gmail.com
I had a thought that maybe I miscompiled boot somehow, so I tried doing a build with the system level boost libraries (version 1.41):

Same result

I'm attaching the output from configure and make as files, just in case these are useful.  These are from a build attempt using boost 1.55 and openmpi.




On Friday, July 18, 2014 1:44:15 PM UTC-7, tray...@bcgsc.ca wrote:
abyss-1.5.2_configure_out
abyss-1.5.2_make_out

Anthony Raymond

unread,
Jul 22, 2014, 4:28:49 PM7/22/14
to Lee Reynolds, abyss...@googlegroups.com
Hi Lee,

I have identical versions of all of these so I don't think it's a compiler issue either. I've attached a patch that you can apply to your source that will force ABySS to not use the semaphore.h header. It will make KAligner slower, but chances are that you aren't going to be using that program anyway since it is not used by default. Apply the patch like so:
patch -p1 <sem_t.work_around.patch

Cheers,
Tony

 
sem_t.work_around.patch
ATT00001..htm

Lee Reynolds

unread,
Jul 23, 2014, 6:00:02 PM7/23/14
to Anthony Raymond, abyss...@googlegroups.com
I discovered the source of the problem.

We're using a windows 2012 server to supply our NFS share.

Files under windows are not truly case sensitive.  The files "bob.txt" and "BoB.tXt" are seen as being the same file.  So attempts to have "myheader.h" and "Myheader.h" in the same directory at the same time fails.  This flaw extends to NTFS filesystems exported over NFS.

I didn't choose to use server 2012 as our NFS server, it was included as part of a package deal by HP to our customer.  If I had my way, the whole thing would be wiped and replaced by Centos 6.5.  That is what I'm pushing for now.  There have been a few other packages that have failed to compile, or failed to run properly, due to this.

When I compile abyss on the local ext3 based filesystem of a cluster node, it compiles beautifully. 

Abyss also compiles on our broken NFS share with your patch applied, thank you :)

Just wanted to let you know what the source of the issue was in case something similar is seen again in the future.

Anthony Raymond

unread,
Jul 23, 2014, 6:27:21 PM7/23/14
to Lee Reynolds, abyss...@googlegroups.com
Thanks for this feedback Lee, and nice catch!!! So the problem here is that we are including "Semaphore.h" twice when we really want "Semaphore.h" (part of ABySS package) and then "semaphore.h" (part of glibc). I did not think of this at all!

Thanks!
Tony
Reply all
Reply to author
Forward
0 new messages