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

gclib: update to new version and unblacklist #12416

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion build-fail-blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,6 @@ recipes/edlib
recipes/esimsa
recipes/fastuniq
recipes/fgap
recipes/gclib
recipes/funcannot
recipes/genepender
recipes/genometester4
Expand Down
22 changes: 10 additions & 12 deletions recipes/gclib/Makefile.osx.patch
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
diff --git a/Makefile b/Makefile
index 43a9c91..9a7beca 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,8 @@ else
endif
endif
--- /tmp/Makefile 2018-06-26 00:26:41.000000000 +0200
+++ Makefile 2018-11-29 12:35:29.172992192 +0100
@@ -41,7 +41,7 @@
CC := g++

+CFLAGS += -fPIC
+
%.o : %.cpp
${CC} ${CFLAGS} -c $< -o $@
BASEFLAGS := -Wall -Wextra ${SEARCHDIRS} $(MARCH) \
- -D_REENTRANT -fno-exceptions -fno-rtti
+ -D_REENTRANT -fno-exceptions -fno-rtti -fPIC

@@ -73,14 +75,17 @@ endif
#add the link-time optimization flag if gcc version > 4.5
GCC_VERSION:=$(subst ., ,$(shell gcc -dumpversion))
@@ -73,14 +73,17 @@
LINKER := g++
LIBS :=
OBJS := GBase.o GStr.o GArgs.o
Expand Down
42 changes: 25 additions & 17 deletions recipes/gclib/Makefile.patch
Original file line number Diff line number Diff line change
@@ -1,26 +1,34 @@
diff --git a/Makefile b/Makefile
index 43a9c91..d937ddd 100644
--- a/Makefile
+++ b/Makefile
@@ -65,6 +65,8 @@ else
endif
endif

+CFLAGS += -fPIC
+
%.o : %.cpp
${CC} ${CFLAGS} -c $< -o $@

@@ -73,14 +75,17 @@ endif
# this patch does two things:
# 1. replace gcc by g++ for getting the version (otherwise
# both compilers would be necessary for compiling)
# 2. gclib does not provide the objects/libraries necessary
# for building gffcompare, so they are added as shared
# object
--- /tmp/Makefile 2018-06-26 00:26:41.000000000 +0200
+++ Makefile 2018-11-29 13:00:38.899628706 +0100
@@ -41,10 +41,10 @@
CC := g++

BASEFLAGS := -Wall -Wextra ${SEARCHDIRS} $(MARCH) \
- -D_REENTRANT -fno-exceptions -fno-rtti
+ -D_REENTRANT -fno-exceptions -fno-rtti -fPIC

#add the link-time optimization flag if gcc version > 4.5
-GCC_VERSION:=$(subst ., ,$(shell gcc -dumpversion))
+GCC_VERSION:=$(subst ., ,$(shell g++ -dumpversion))
GCC_MAJOR:=$(word 1,$(GCC_VERSION))
GCC_MINOR:=$(word 2,$(GCC_VERSION))
#GCC_SUB:=$(word 3,$(GCC_VERSION))
@@ -73,14 +73,17 @@
LINKER := g++
LIBS :=
LIBS :=
OBJS := GBase.o GStr.o GArgs.o
+GCLIBS := GFastaIndex.o GFaSeqGet.o gff.o gdna.o codons.o GBase.o GStr.o GArgs.o

.PHONY : all
-all: gtest threads
+all: gtest threads gffcomparelibs

version: ; @echo "GCC Version is: "$(GCC_MAJOR)":"$(GCC_MINOR)":"$(GCC_SUB)
@echo "> GCC Opt. string is: "$(GCC45OPTS)
debug: gtest threads
Expand Down
67 changes: 67 additions & 0 deletions recipes/gclib/chrono.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# gclib includes a chrono namespace which is nowadays
# also in C++ stdlib. As a result the compiler complains about
# ambiguous namespace which is resolved by this patch
# reported upstream: https://github.com/gpertea/gclib/issues/3
diff -ruN /tmp/gclib-0.10.3/GThreads.cpp ./GThreads.cpp
bernt-matthias marked this conversation as resolved.
Show resolved Hide resolved
--- ./GThreads.cpp 2018-06-26 00:26:41.000000000 +0200
+++ ./GThreads.cpp 2018-11-29 13:55:31.212906749 +0100
@@ -375,7 +375,7 @@

void GThread::wait_all() {
while (GThread::num_running()>0)
- this_thread::sleep_for(chrono::milliseconds(4));
+ this_thread::sleep_for(gclib::chrono::milliseconds(4));
}


diff -ruN /tmp/gclib-0.10.3/GThreads.h ./GThreads.h
--- ./GThreads.h 2018-06-26 00:26:41.000000000 +0200
+++ ./GThreads.h 2018-11-29 13:56:50.372545993 +0100
@@ -822,7 +822,7 @@

/// Minimal implementation of the \c chrono namespace.
/// The \c chrono namespace provides types for specifying time intervals.
-namespace chrono {
+namespace gclib{ namespace chrono {
/// Duration template class. This class provides enough functionality to
/// implement \c this_thread::sleep_for().
template <class _Rep, class _Period = ratio<1> > class duration {
@@ -850,7 +850,7 @@
typedef duration<int64_t> seconds; ///< Duration with the unit seconds.
typedef duration<int64_t, ratio<60> > minutes; ///< Duration with the unit minutes.
typedef duration<int64_t, ratio<3600> > hours; ///< Duration with the unit hours.
-}
+}}

/// The namespace \c this_thread provides methods for dealing with the
/// calling thread.
@@ -879,7 +879,7 @@
/// @endcode
/// @note Supported duration types are: nanoseconds, microseconds,
/// milliseconds, seconds, minutes and hours.
- template <class _Rep, class _Period> void sleep_for(const chrono::duration<_Rep, _Period>& aTime)
+ template <class _Rep, class _Period> void sleep_for(const gclib::chrono::duration<_Rep, _Period>& aTime)
{
#if defined(_GTHREADS_WIN32_)
Sleep(int(double(aTime.count()) * (1000.0 * _Period::_as_double()) + 0.5));
diff -ruN /tmp/gclib-0.10.3/threads.cpp ./threads.cpp
--- ./threads.cpp 2018-06-26 00:26:41.000000000 +0200
+++ ./threads.cpp 2018-11-29 13:57:33.300350761 +0100
@@ -28,7 +28,7 @@
//cout << " My thread id is " << thisThread->get_id() << "." << endl << flush;
cout << " My thread id is " << my.thread->get_id() << "." << endl << flush;
}
- this_thread::sleep_for(chrono::seconds(4));
+ this_thread::sleep_for(gclib::chrono::seconds(4));
}

#ifndef GTHREADS_NO_TLS
@@ -209,7 +209,7 @@
// Start the waiting thread (it will wait for gCount to reach zero).
GThread t1(ThreadCondition2, 0);

- this_thread::sleep_for(chrono::milliseconds(400));
+ this_thread::sleep_for(gclib::chrono::milliseconds(400));
{

for (int c=5;c>=0;c--) {
10 changes: 5 additions & 5 deletions recipes/gclib/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
package:
name: gclib
version: "0.0.1"
version: "0.10.13"

build:
number: 5
number: 0
skip: False

source:
url: https://github.com/gpertea/gclib/archive/907a9d6484b92ea0c357baf2da5d85bc6e6b82b1.tar.gz
md5: 13891db103fab3457beb621ab43f8843
url: https://github.com/gpertea/gclib/archive/v0.10.3.tar.gz
sha256: f5f9d4764afe83d5b9cc851c4dab352906505be7a6c03958c2af51c554118c18
patches:
- Makefile.patch # [not osx]
- Makefile.osx.patch # [osx]
- chrono.patch

requirements:
build:
- {{ compiler('cxx') }}
run:

test:
commands:
Expand Down