Bug 4828 - xc doesn't compile anymore on netbsd > 2.1
Summary: xc doesn't compile anymore on netbsd > 2.1
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: git
Hardware: x86 (IA32) NetBSD
: high normal
Assignee: Xorg Project Team
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 1690
  Show dependency treegraph
 
Reported: 2005-10-20 11:50 UTC by germain
Modified: 2005-11-29 21:17 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description germain 2005-10-20 11:50:26 UTC
Hi,

I posted that patch one month ago on xorg list :

====8<====8<====

netbsd no longer use the lib threadlib for threading ( since version 2.1.4 I
presume. )
if you applied the attached patch it works.


Index: xc/config/cf/NetBSD.cf
===================================================================
RCS file: /cvs/xorg/xc/config/cf/NetBSD.cf,v
retrieving revision 1.6
diff -u -r1.6 NetBSD.cf
--- xc/config/cf/NetBSD.cf	15 Aug 2004 00:03:36 -0000	1.6
+++ xc/config/cf/NetBSD.cf	18 Sep 2005 23:03:56 -0000
@@ -115,9 +115,11 @@
 #endif
 
 #if NetBSDThreads && \
-    ((OSMajorVersion > 1) || \
-     (OSMajorVersion == 1 && OSMinorVersion > 6) || \
-     (OSMajorVersion == 1 && OSMinorVersion == 6 && OSTeenyVersion >= 13))
+    (((OSMajorVersion == 1 && OSMinorVersion > 6) || \
+	  (OSMajorVersion == 1 && OSMinorVersion == 6 && OSTeenyVersion >= 13)) \
+		&& (OSMajorVersion == 2 && ((OSMinorVersion == 1 && \
+				             OSTeenyVersion <= 4) || \
+				            (OSMinorVersion == 0))))
 
 # define HasPosixThreads	YES
 # define ThreadedX		YES

====>8====>8====
Comment 1 Adam Jackson 2005-10-23 12:19:58 UTC
applied, thanks
Comment 2 Jeremy C. Reed 2005-11-11 11:59:25 UTC
Please reopen this. The change indicates that NetBSD does not have threads. The
problem is only missing threadlib.h related to USE_NBSD_THREADLIB. Here is fix
from NetBSD's own xsrc:

http://cvsweb.netbsd.org/bsdweb.cgi/xsrc/xfree/xc/config/cf/NetBSD.cf

The patch I used:

--- config/cf/NetBSD.cf.orig    2005-11-10 10:53:04.000000000 -0800
+++ config/cf/NetBSD.cf 2005-11-10 10:57:40.000000000 -0800
@@ -123,7 +123,11 @@
 # define ThreadedX             YES
 # define HasThreadSafeAPI      YES
 # define ThreadsLibraries      -lpthread
-# define LibraryMTDefines      -DUSE_NBSD_THREADLIB
+# if ((OSMajorVersion == 2 && OSMinorVersion == 99 && OSTeenyVersion < 11) || \
+      (OSMajorVersion == 2 && OSMinorVersion < 99) || \
+      (OSMajorVersion < 2))
+#  define LibraryMTDefines     -DUSE_NBSD_THREADLIB
+# endif
 # define SystemMTDefines       -D_REENTRANT
 # define MTSafeAPIDefines      -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
 #else
Comment 3 Jeremy C. Reed 2005-11-22 13:32:24 UTC
Set that it blocks 1690 "Tracker for X11R6.9 and X11R7".
Comment 4 Adam Jackson 2005-11-30 16:17:29 UTC
re-fixed.

jeremy, it'd probably be quite a bit easier if we just hooked you up with commit
access so you can fix this stuff directly.  pop open an account request and i'll
hook you up.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.