Problems under FreeBSD 10

OSS specific BSD discussion (FreeBSD/NetBSD/OpenBSD)

Moderators: hannu, dev, cesium

SID-6581
New Member
Posts: 2
Joined: Sat Feb 01, 2014 8:35 pm

Problems under FreeBSD 10

Postby SID-6581 » Sat Feb 01, 2014 9:05 pm

I tried to install oss-v4.2-build2007 in FreeBSD's 10 environment. However, it seems, a little "refresh" of the package would be needed:

1. Version 10 introduced new package manager. Still not sure, how to replace old commands (reading the docs) - anyway: a change in the scripts would make the life of FreeBSD users a little easier.

2. I tried to install the drivers with "make install" instead. Unfortunately, there is an error message almost at the finish:

Compiling module osscore
Compiling osscore module failed
Warning: Object directory not changed from original /usr/lib/oss/build
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse -msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -diagnostics-show-option -Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c osscore.c
osscore.c:78:12: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
panic (tmp);
^~~
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/lib/oss/build
*** Error code 1

Stop.
make: stopped in /root/oss


Not sure, how can I fix it.

I even tried to install a package compiled and prepared a year ago for FreeBSD 9 - unfortunately, the system complained about improper package format (lack of MANIFEST file, IIRC).

I tried then also to use the sources oss-v4.2-buildrc3-src-bsd.tar.bz2 - but in this case compilation failed even sooner, with a message complaining: osspartysh.c:49:10: fatal error: 'utmp.h' file not found

Well, I've traced the problem, made a symlink utmp.h -> utmpx.h and tried again; and one more time "unfortunately!" :(

os_freebsd.c:235:5: warning: implicit declaration of function
'device_set_desc'
is invalid in C99 [-Wimplicit-function-declaration]
device_set_desc (osdev->dip, name);
^
os_freebsd.c:318:3: warning: array index 127 is past the end of the array
(which contains 16 elements) [-Warray-bounds]
ci->shortname[127] = 0;
^ ~~~
../../../include/soundcard.h:2021:3: note: array 'shortname' declared here
char shortname[16];
^
os_freebsd.c:906:1: error: conflicting types for 'oss_mmap'
oss_mmap (struct cdev *bsd_dev, vm_offset_t offset, vm_paddr_t * paddr,
^
os_freebsd.c:35:17: note: previous declaration is here
static d_mmap_t oss_mmap;
^
2 warnings and 1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /root/oss/kernel/OS/FreeBSD
*** Error code 1

Stop.
make: stopped in /root/oss


Could be possible for you to update the source package, to make it compile, install (and create the binary package) with no problems? Many thanks in advance!

Update: I have to admit, I missed the newest version which seems to be "stable oss-v4.2-build2008-src-bsd.tar.bz2". Tried to compile it a minute ago, and this one also failed with:

Compiling module osscore
Compiling osscore module failed
Warning: Object directory not changed from original /usr/lib/oss/build
cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq -fno-common -mno-aes -mno-avx -mno-mmx -mno-sse --msoft-float -ffreestanding -fstack-protector -std=iso9899:1999 -Qunused-arguments-fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes --Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign-fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option --Wno-error-tautological-compare -Wno-error-empty-body -Wno-error-parentheses-equality -c osscore.c osscore.c:78:12: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
panic (tmp);
^~~
1 error generated.
*** Error code 1

Stop.
make[1]: stopped in /usr/lib/oss/build
*** Error code 1

Stop.
make: stopped in /root/oss


...and the package manager issue is worthy to address.

SID-6581
New Member
Posts: 2
Joined: Sat Feb 01, 2014 8:35 pm

Re: Problems under FreeBSD 10

Postby SID-6581 » Sun Feb 02, 2014 4:56 pm

After some examination I decided to change the line 78 in setup/FreeBSD/oss/build/osscore.c from:

Code: Select all

panic (tmp);


to:

Code: Select all

panic ("%s", tmp);


The compilation went fine - is it correct, what I've done? - still not installed yet at the moment, trying to resolve the package creation issues.


Return to “BSD”

Who is online

Users browsing this forum: No registered users and 2 guests