Comments (20)
cmake creates a file CMakeFiles/bamm.dir/link.txt in the build directory that contains the final linking command. Change '-lpthread' to '-pthread' in this file and re-run the command to build a working binary. This worked for me on Ubuntu 14.04.
from bamm.
Hello,
We found this problem as well yesterday and I'm working on a solution. C++11 threads requires that the pthread library also be linked. The following will solve the problem, but I'm working on a more permanent solution:
SET(CMAKE_EXE_LINKER_FLAGS "-pthread")
from bamm.
Hi,
Just tried that too, and rebuilt "bamm" from scratch, but didn't WFM:
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f27da2..ed40faa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,7 +19,7 @@ IF(NOT WIN32)
IF(APPLE AND (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
SET(CXX_LANGUAGE_FLAGS "-std=c++11 -stdlib=libc++")
SET(CXX_ARCHITECTURE_FLAGS "-arch x86_64")
- SET(CMAKE_EXE_LINKER_FLAGS "-stdlib=libc++")
+ SET(CMAKE_EXE_LINKER_FLAGS "-pthread")
ENDIF(APPLE AND (${CMAKE_CXX_COMPILER_ID} MATCHES Clang))
ELSE(NOT WIN32)
SET(CXX_WARNING_FLAGS "/W4")
from bamm.
Sorry, closed by accident(!)
from bamm.
Hello,
I've updated the CMake configuration file to find pthreads and link it. Please pull again from GitHub and let me know if it works now. Let me know which compiler you're using if it doesn't work. I tested it on g++ version 4.8.0. Thanks!
from bamm.
Hi,
Just re-cloned "bamm" from GitHub and rebuilt, but the same error as before - Not surprising, really, because I already tried the same edit manually ;-)
I'm using:
root@wildcat:/usr/local/src/bioinformatics/BAMM/bamm/build# g++ --version
g++ (Ubuntu 4.8.2-19ubuntu1) 4.8.2
Thanks for looking into the problem,
Tony.
from bamm.
Let's see if it's a CMake problem or something else... In an empty "build" directory, compile bamm manually (without CMake):
g++ -DBAMM_VERSION=\"1.0\" -DBAMM_VERSION_DATE=\"1\" -DGIT_COMMIT_ID=\"0\" -pthread -std=c++11 -o bamm ../src/*.cpp
It should take less than a minute to compile and produce a single executable program named bamm. Try running it with data and let me know if that works.
Thanks.
from bamm.
OK, that works :-)
Thanks,
Tony.
from bamm.
That's great. I'm not entirely sure, yet, why running CMake didn't work. I've made some changes to the CMakeLists.txt file. Do you mind pulling again, compiling using CMake, then running bamm?
Thanks.
from bamm.
Hi,
I did a new "git clone", but I got the same problem running "bamm" as before:
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted
Bye,
Tony.
from bamm.
I'm still not sure what the problem is, and I cannot replicate this error on my computer (also running GCC 4.8.2), but this link may provide an answer: http://stackoverflow.com/questions/20568235/using-c11-multithreading-in-shared-library-loaded-by-programm-without-thread-s (look at checked answer).
from bamm.
I am getting the same problem here. Clean everything and same error
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted (core dumped)
Tried manual pthread linking and all that. No luck
This does work on the recent debian so this is an ubuntu problem.
from bamm.
On 02/10/14 01:09, Stephen Smith wrote:
I am getting the same problem here. Clean everything and same error
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Aborted (core dumped)
Tried manual pthread linking and all that. No luck
This does work on the recent debian so this is an ubuntu problem.
Hi, Stephen.
Looks like a "cmake" problem, really, because the program compiles and
runs properly without using "cmake". We are running the binary OK now.
Bye,
Tony.
Minke Informatics Limited, Registered in Scotland - Company No. SC419028
Registered Office: 3 Donview, Bridge of Alford AB33 8QJ, Scotland (UK)
tel. +44(0)19755 63548 http://minke-informatics.co.uk
mob. +44(0)7985 078324 mailto:[email protected]
from bamm.
Thanks Tony, you are correct that worked fine.
from bamm.
Hi I am running bamm in Ubuntu 14 LTS and I am facing the same problem.
I tried the solution proposed: "
g++ -DBAMM_VERSION="1.0" -DBAMM_VERSION_DATE="1" -DGIT_COMMIT_ID="0" -pthread -std=c++11 -o bamm ../src/*.cpp"
and it works, however it seems to take much longer when compared with an similar windows computer. Any suggestion?
Thanks in advance,
Gustavo
from bamm.
I just compiled the version 2.5 on ubuntu 14.04 and run into this issue:
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
the above mentioned solution of rhr solved the issue.
from bamm.
Hi everyone,
I am very novice with the use of linux. I work since a week on ubuntu 14.04.
I installed bamm and had the same problem when running an analysis (with the same error message as above :
terminate called after throwing an instance of 'std::system_error', what(): Enable multithreading to use std::thread: Operation not permitted, Aborted)
I attempted to use the solution proposed by rhr. But apparently I haven't done properly the manipulation under the shell, because :
- bamm still doesn't work (I get the same error message when running analyses)
- when I re-open the file CMakeFiles/bamm.dir/link.txt
the '-lpthread' reappeared even if I changed it previously by '-pthread' (just before running the cmake .. command)
Could you explain me step by step what I have to do in the shell to solve this problem.
Thank you in advances
from bamm.
The solution proposed by rhr works for me as well.
@loloNC : you are not supposed to re-run cmake ..
. Edit the file, then run cmake -j
and it should work.
from bamm.
Just instaled BAMM v2.5 and it is working very nice on Ubuntu 16.04.
Instaled from source with the following commands:
git clone https://github.com/macroevolution/bamm.git
mkdir build
cd build
cmake ..
make -j
sudo make install
from bamm.
@tmozgach resolved this issue with Linuxbrew and Homebrew/science in PR https://github.com/Homebrew/homebrew-science/pull/5832
If you're encountering this issue, you may wish to consider installing bamm
using Linuxbrew
See http://linuxbrew.sh for Linuxbrew installation instructions then run
brew install homebrew/science/bamm
from bamm.
Related Issues (20)
- node labels cause problems in plotting HOT 4
- Support non-ultrametric trees HOT 1
- Pick lambdaInit0 from prior
- New add event proposal to pick branches HOT 2
- Simplified control file HOT 5
- Time-flip proposal prior
- Write MC3 documentation
- BAMM installation documentation HOT 3
- Analyze multiple trees HOT 1
- Top information when running BAMM HOT 1
- Add version information to bamm program header HOT 2
- getBestShiftConfiguration HOT 1
- E0 initializations
- high resolution clock for seed HOT 2
- Feature request: the ability to turn off density dependence HOT 9
- The option validateEventConfiguration gives wrong prior distribution HOT 1
- The extinction probability, E(t), are estimated incorretly HOT 1
- ensure compatibility of lambdaIsTimeVariablePrior and updateRateLambdaShift
- plot HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bamm.