I got some weird compile error? #389

Closed
opened 2026-01-29 20:43:09 +00:00 by claunia · 2 comments
Owner

Originally created by @CandyMi on GitHub (Jul 19, 2021).

I am currently using the version and make sure the installation is complete properly.

CandyMi@localhost ~/br
$ brotli.exe -V
brotli 1.0.9
$ cc -v
Using built-in specs.
COLLECT_GCC=cc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.0 (GCC)

A snippet of code that I wrote.:

#include <brotli/port.h>
#include <brotli/types.h>
#include <brotli/encode.h>
#include <brotli/decode.h>

int Decoder() {
 // .Some extraneous code ...
  BrotliDecoderState s;
  
  BrotliDecoderResult code = BrotliDecoderDecompressStream(&s, &isize, (uint8_t **), ..., ...);
  
  // This is followed by other unrelated code...
}

Then I ran into this error at compile time :

br.c: In function ‘bruncompress’:
br.c:93:22: error: storage size of ‘s’ isn’t known
   93 |   BrotliDecoderState s;

The error message still exists even if all the dynamic libraries contain the related declaration files and links.

Has anyone experienced this problem? Or Anyone can give me some fix tips? : )

Originally created by @CandyMi on GitHub (Jul 19, 2021). I am currently using the version and make sure the installation is complete properly. ```bash CandyMi@localhost ~/br $ brotli.exe -V brotli 1.0.9 ``` ```bash $ cc -v Using built-in specs. COLLECT_GCC=cc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-cygwin/10/lto-wrapper.exe Target: x86_64-pc-cygwin Configured with: /mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0/configure --srcdir=/mnt/share/cygpkgs/gcc/gcc.x86_64/src/gcc-10.2.0 --prefix=/usr --exec-prefix=/usr --localstatedir=/var --sysconfdir=/etc --docdir=/usr/share/doc/gcc --htmldir=/usr/share/doc/gcc/html -C --build=x86_64-pc-cygwin --host=x86_64-pc-cygwin --target=x86_64-pc-cygwin --without-libiconv-prefix --without-libintl-prefix --libexecdir=/usr/lib --with-gcc-major-version-only --enable-shared --enable-shared-libgcc --enable-static --enable-version-specific-runtime-libs --enable-bootstrap --enable-__cxa_atexit --with-dwarf2 --with-tune=generic --enable-languages=c,c++,fortran,lto,objc,obj-c++ --enable-graphite --enable-threads=posix --enable-libatomic --enable-libgomp --enable-libquadmath --enable-libquadmath-support --disable-libssp --enable-libada --disable-symvers --with-gnu-ld --with-gnu-as --with-cloog-include=/usr/include/cloog-isl --without-libiconv-prefix --without-libintl-prefix --with-system-zlib --enable-linker-build-id --with-default-libstdcxx-abi=gcc4-compatible --enable-libstdcxx-filesystem-ts Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 10.2.0 (GCC) ``` A snippet of code that I wrote.: ```C #include <brotli/port.h> #include <brotli/types.h> #include <brotli/encode.h> #include <brotli/decode.h> int Decoder() { // .Some extraneous code ... BrotliDecoderState s; BrotliDecoderResult code = BrotliDecoderDecompressStream(&s, &isize, (uint8_t **), ..., ...); // This is followed by other unrelated code... } ``` Then I ran into this error at compile time : ```bash br.c: In function ‘bruncompress’: br.c:93:22: error: storage size of ‘s’ isn’t known 93 | BrotliDecoderState s; ``` The error message still exists even if all the dynamic libraries contain the related declaration files and links. Has anyone experienced this problem? Or Anyone can give me some fix tips? : )
Author
Owner

@CandyMi commented on GitHub (Jul 19, 2021):

add: The makefilefile contains the following dynamic libraries.

LDD = -lbrotlicommon -lbrotlienc -lbrotlidec
@CandyMi commented on GitHub (Jul 19, 2021): add: The `makefile`file contains the following dynamic libraries. ```makefile LDD = -lbrotlicommon -lbrotlienc -lbrotlidec ```
Author
Owner

@CandyMi commented on GitHub (Jul 19, 2021):

I've seen the notes.

@CandyMi commented on GitHub (Jul 19, 2021): I've seen the notes.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/brotli#389