[go: up one dir, main page]

Menu

#65 Compilation error in owfs module/owlib/src/c/ow_rwlock.c

v0.9x
open
nobody
9
2015-07-09
2015-07-09
fancer
No

Hello there.

Description:
There is a syntax error in the release source code: owfs-3.1p0.
The syntax error is located in the file module/owlib/src/c/ow_rwlock.c at line 28:
27: if(semrc != 0) {
28: if (
29: LOCK_DEBUG("semrc=%d [%s] RWLOCK INIT", semrc, strerror(errno));

It seems like just accidental copy/paste. So such the mistake leads to the following compilation-time error:
libtool: compile: mips64-octeon-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../../../../src/include -I../include -fexceptions -Wall -W -Wundef -Wshadow -Wpointer-arith -Wcast-qual -Wcast-align -Wstrict-prototypes -Wredundant-decls -D__EXTENSIONS__ -D_FILE_OFFSET_BITS=64 -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -pthread -mabi=64 -march=octeon3 -Os -fomit-frame-pointer -D_XOPEN_SOURCE=600 -D_BSD_SOURCE=1 -D_ISOC99_SOURCE=1 -D_POSIX_C_SOURCE=200112L -MT ow_rwlock.lo -MD -MP -MF .deps/ow_rwlock.Tpo -c ow_rwlock.c -fPIC -DPIC -o .libs/ow_rwlock.o
ow_rwlock.c: In function 'my_rwlock_init':
ow_rwlock.c:29:3: error: expected expression before 'if'
ow_rwlock.c:31:2: error: expected expression before '}' token
make[6]: *** [ow_rwlock.lo] Error 1

Fix:
The deletion of the line 28 fixes the error,

Configuration options:
./configure --quiet --prefix=/usr --host=${CROSS}
--with-fuseinclude=${ROOT}/usr/include
--with-fuselib=${ROOT}/usr/lib
--disable-debian --disable-debug --disable-mutexdebug
--disable-owshell --enable-owlib --disable-ownetlib
--enable-i2c --enable-w1 --disable-owhttpd --disable-owftpd
--disable-owserver --disable-owexternal --disable-ownet
--disable-owtap --disable-owmalloc --disable-owmon
--enable-owcapi --disable-swig --disable-owperl
--disable-owphp --disable-owpython --disable-owtcl
--disable-profiling --enable-owfs --disable-zero
--disable-usb --disable-avahi --enable-parport

Host platform:
$ uname -a
Linux mobilestation.ru 3.11.10-29-desktop #1 SMP PREEMPT Thu Mar 5 16:24:00 UTC 2015 (338c513) x86_64 x86_64 x86_64 GNU/Linux

$ cat /etc/os-release
NAME=openSUSE
VERSION="13.1 (Bottle)"
VERSION_ID="13.1"
PRETTY_NAME="openSUSE 13.1 (Bottle) (x86_64)"

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib64/gcc/x86_64-suse-linux/4.8/lto-wrapper
Target: x86_64-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.8 --enable-ssp --disable-libssp --disable-plugin --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib64 --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --enable-linker-build-id --program-suffix=-4.8 --enable-linux-futex --without-system-libunwind --with-arch-32=i586 --with-tune=generic --build=x86_64-suse-linux
Thread model: posix
gcc version 4.8.1 20130909 [gcc-4_8-branch revision 202388] (SUSE Linux)

Target platform:
MIPS (Cavium Octeon III)
Cavium SDK 3.1 includes Linux version 3.10 and it's own rootfs.

$ mips64-octeon-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=mips64-octeon-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/windows/TMP/Workdir/IT/T-platforms/SCD/sdk/tools/bin/../libexec/gcc/mips64-octeon-linux-gnu/4.7.0/lto-wrapper
Target: mips64-octeon-linux-gnu
Configured with: /usr/local/Cavium_Networks/octsw/toolchain/scripts/../src/configure --disable-fixed-point --without-ppl --without-python --disable-werror --with-lto-plugin-source=/usr/local/Cavium_Networks/octsw/toolchain/scripts/../gits/gcc/lto-plugin --enable-plugins --with-sysroot --with-local-prefix=/usr/local/Cavium_Networks/octsw/toolchain/scripts/../tools/mips64-octeon-linux-gnu/sys-root --disable-sim --enable-symvers=gnu --enable-__cxa_atexit --enable-symvers=gnu --enable-__cxa_atexit --with-mips-plt --disable-sim --target=mips64-octeon-linux-gnu --enable-languages=c,c++ --prefix=/usr/local/Cavium_Networks/octsw/toolchain/scripts/../tools --with-pkgversion='Cavium Inc. Version: SDK_3_1_0_p2 build 34' --with-bugurl=http://www.cavium.com/support.html --with-libexpat-prefix=/usr/local/Cavium_Networks/octsw/toolchain/scripts/../libs
Thread model: posix
gcc version 4.7.0 (Cavium Inc. Version: SDK_3_1_0_p2 build 34)

Sincerely,
fancer

Discussion

  • fancer

    fancer - 2015-07-09

    Alright then. I didn't find it.