nV News Forums

 
 

nV News Forums (http://www.nvnews.net/vbulletin/index.php)
-   NVIDIA FreeBSD (http://www.nvnews.net/vbulletin/forumdisplay.php?f=47)
-   -   7.0-BETA2 nvidia-driver signedness compilation issues (http://www.nvnews.net/vbulletin/showthread.php?t=102460)

sarumont 11-15-07 06:11 PM

7.0-BETA2 nvidia-driver signedness compilation issues
 
Has anyone seen anything like the following when compiling nvidia-driver under 7.0-BETA2? The only remotely close references I can find are from the Linux nvidia-driver and are a few years old. Thanks.

Code:

cc1: note: obsolete option -I- used, please use -iquote instead
cc1: warnings being treated as errors
nvidia_os.c: In function 'os_dbg_init':
nvidia_os.c:370: warning: pointer targets in passing argument 3 of 'rm_read_registry_dword' differ in signedness
nvidia_os.c:370: warning: pointer targets in passing argument 4 of 'rm_read_registry_dword' differ in signedness
nvidia_os.c: In function 'os_string_compare':
nvidia_os.c:510: warning: pointer targets in passing argument 1 of 'strcmp' differ in signedness
nvidia_os.c:510: warning: pointer targets in passing argument 2 of 'strcmp' differ in signedness
nvidia_os.c: In function 'os_string_copy':
nvidia_os.c:518: warning: pointer targets in passing argument 1 of 'strcpy' differ in signedness
nvidia_os.c:518: warning: pointer targets in passing argument 2 of 'strcpy' differ in signedness
nvidia_os.c:518: warning: pointer targets in return differ in signedness
nvidia_os.c: In function 'os_string_length':
nvidia_os.c:523: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19/src.
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver/work/NVIDIA-FreeBSD-x86-100.14.19.
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver.
*** Error code 1

Stop in /usr/ports/x11/nvidia-driver.


zander 11-15-07 06:51 PM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
I hadn't seen this before, but will take a closer look. Does this happen outside of the ports/ tree? The simplest workaround for now probably is to add '-Wno-sign-compare' to the CFLAGS of the NVIDIA kernel module Makefile.

sarumont 11-16-07 07:19 AM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
I get the same results in ports and with the tarball from the downloads section. Also, -Wno-sign-compare did not have any effect. :-\

sarumont 11-16-07 09:01 PM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
Looking at it a bit more closely, -Werror is in the cc command. I can't figure out where it is being added to my CFLAGS, though. It's present in both the port and the source version.

zander 11-17-07 06:40 PM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
@ sarumont: the only way I could make this happen on FreeBSD 7.0-BETA2 was by editing /usr/share/mk/bsd.sys.mk and explicitely adding '-Wpointer-sign' to CWARNFLAGS; you may be able to fix your problem by editing the same file and making sure that '-Wno-pointer-sign' is added to CWARNFLAGS last.

sarumont 11-19-07 07:51 AM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
Zander: Thanks a lot! -Wno-pointer-sign was being added conditionally ( if GCC3 ). I moved it to be added unconditionally, and nvidia-driver builds. I won't be able to test it until tonight, but I don't anticipate any problems.

Thanks for throwing some time at this.

sarumont 11-21-07 10:57 AM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
Unfortunately, no testing is required. kldload fails stating that there is no such file or directory as nvidia, but I suspect the real problem is what ends up in my logs:

Code:

Nov 21 10:38:39 illusion kernel: link_elf: symbol cv_wait undefined
The only things I've been able to find referring to cv_wait and the FreeBSD nvidia-driver were those related to it being called with the wrong mutex. I also tried the beta drivers you posted, but I had the same results.

Any ideas on this one?

zander 11-21-07 12:17 PM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
cv_wait() didn't go away, as far as I know, and the right set of header files should be included. Can you post the complete set of build time messages?

sarumont 11-21-07 05:24 PM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
2 Attachment(s)
Sure thing. I'm attaching the build output from the ports version and the beta.

sarumont 11-27-07 08:36 AM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
Call off the hounds! In attempting to determine was up with the (apparent) linking problem, I thought to update and rebuild my world. I had been building in /usr/7.0/src rather than /usr/src. Moving to /usr/src seems like it has fixed something.

Mergemaster was noisier this time around, and I finally saw the "FreeBSD version not supported" error when compiling the beta drivers. Now, though, everything builds, installs, loads and runs. I've never been more delighted to see the nVidia splash screen. :)

Looking back at it, though, I think that everything stemmed from me not using the -m option to mergemaster. I guess I expected it to automagically determine from whence my sources came. Moving them to /usr/src and rebuilding accomplished the same thing as mergemaster -m /usr/7.0/src (only with a lot more time and headaches).

Thanks for your time, zander. Sorry for wasting it due to my oversight. :)

P.S - Hope you had a good Thanksgiving.

zander 11-27-07 10:43 AM

Re: 7.0-BETA2 nvidia-driver signedness compilation issues
 
That's good to hear; thanks for the update!


All times are GMT -5. The time now is 11:52 AM.

Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.