Bug 48511

Summary: math/atlas does not build with multithreaded support enabled
Product: Ports & Packages Reporter: Josh Tolbert <hemi>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Josh Tolbert 2003-02-21 03:00:26 UTC
	math/atlas will not build with multithreaded support enabled without changing
	the flag used to link against POSIX threads from -lpthread to -pthread. This
	issue shows up on SMP machines cause Atlas doesn't ask to build with multithreading
	support on single-CPU machines. The problem will occur under both 4.x and 5.x.

Fix: cd /usr/ports/math/atlas
	make patch
	Apply the following patch to math/atlas/work/ATLAS/config.c



make
	Build should finish without errors, after which you can "make install".--fTYwe0GyxuJtfE3e6eAsTPeTYNWKOZm9YRahRz8oEMDUaNQY
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- config.c	Thu Feb 20 20:11:53 2003
+++ config.c.new	Thu Feb 20 20:12:08 2003
@@ -1091,7 +1091,7 @@
 
 void GetSyslib(enum OSTYPE OS, enum MACHTYPE mach, char *targ, char *LIBS)
 {
-   if (THREADS) strcpy(LIBS, "-lpthread -lm");
+   if (THREADS) strcpy(LIBS, "-pthread -lm");
    else strcpy(LIBS, "-lm");
 
    switch(OS)
How-To-Repeat: 	On an i386 SMP machine:
	cd /usr/ports/math/atlas
	make
	answer yes when asked to enable multithreaded support.
	Wait for build to error out with unknown linker flag -lpthread.
Comment 1 Maho Nakata freebsd_committer freebsd_triage 2003-05-09 23:46:28 UTC
State Changed
From-To: open->closed

Fixed. Thanks.