Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'jump_buf' does not name a type #458

Closed
scrameri opened this issue Dec 17, 2021 · 2 comments
Closed

'jump_buf' does not name a type #458

scrameri opened this issue Dec 17, 2021 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@scrameri
Copy link

scrameri commented Dec 17, 2021

Dear Michael,

I tried to install htmldoc on a computing cluster (with no root access, and no internet access). It got stuck with an error during compilation:

The procedure was :
1) download htmldoc to my desktop computer (MacOS 10.15.7)

git clone https://github.com/michaelrsweet/htmldoc

2) upload the folder htmldoc to the cluster (personal ~/bin/ folder)

3) run these lines

cd htmldoc
chmod -u+rwx configure
./configure

... which printed this:

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gawk... gawk
checking for clang... no
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether cc accepts -g... yes
checking for cc option to enable C11 features... -std=gnu11
checking for clang++... no
checking for c++... c++
checking whether the compiler supports GNU C++... yes
checking whether c++ accepts -g... yes
checking for c++ option to enable C++11 features... none needed
checking how to run the C preprocessor... cc -std=gnu11 -E
checking for ranlib... ranlib
checking for ar... /usr/bin/ar
checking for chmod... /usr/bin/chmod
checking for cp... /usr/bin/cp
checking for fltk-config... no
checking for install-sh script... using /cluster/home/crameris/bin/htmldoc/install-sh
checking for mv... /usr/bin/mv
checking for mkdir... /usr/bin/mkdir
checking for rm... /usr/bin/rm
checking for pkg-config... /usr/bin/pkg-config
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for strings.h... (cached) yes
checking for locale.h... yes
checking for strdup... yes
checking for strcasecmp... yes
checking for strncasecmp... yes
checking for strlcat... no
checking for strlcpy... no
checking for snprintf... yes
checking for vsnprintf... yes
checking for random... yes
checking for lrand48... yes
checking for arc4random... no
checking for tm_gmtoff member in tm structure... yes
checking for pow in -lm... yes
checking for poll... yes
checking for library containing socket... none required
checking for library containing gethostbyaddr... none required
checking for library containing getaddrinfo... none required
checking for library containing getnameinfo... none required
checking for library containing hstrerror... none required
checking for library containing __res_init... none required
checking for resolv.h... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for long long int... yes
checking for strtoll... yes
checking for libgnutls-config... no
checking for libgcrypt-config... /usr/bin/libgcrypt-config
configure: Using SSLFLAGS="", SSLLIBS=""
configure: WARNING: FLTK not available so no GUI will be built.
checking for libjpeg... yes
checking for library containing gzgets... -lz
checking for libpng-1.6.x... no
checking whether compiler supports -Wno-char-subscripts... yes
checking whether compiler supports -Wno-deprecated-declarations... yes
checking whether compiler supports -Wno-format-truncation... yes
checking whether compiler supports -Wno-format-y2k... yes
checking whether compiler supports -Wno-switch... yes
checking whether compiler supports -Wno-unused-result... yes
checking whether GCC supports -fno-rtti... yes
checking whether GCC supports -fno-exceptions... yes
configure: creating ./config.status
config.status: creating Makedefs
config.status: creating Makefile
config.status: creating desktop/htmldoc.plist
config.status: creating config.h
configure: Using CPPFLAGS=  
configure: Using CXXFLAGS= -D_FORTIFY_SOURCE=2 -fno-rtti -fno-exceptions
configure: Using LDFLAGS=
configure: Using LIBS=-lz -lm  -ljpeg   -lz

4) run make, which printed this:

Making all in htmldoc...
Compiling gui.cxx...
Compiling epub.cxx...
Compiling html.cxx...
Compiling htmldoc.cxx...
Compiling htmlsep.cxx...
Compiling license.cxx...
Compiling markdown.cxx...
Compiling mmd.c...
Compiling ps-pdf.cxx...
ps-pdf.cxx: In function ‘void parse_contents(tree_t*, float, float, float, float, float*, int*, int*, tree_t*)’:
ps-pdf.cxx:3912:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               for (int i = *page + 1; i < num_pages; i ++)
                                           ^
ps-pdf.cxx:3920:43: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
               for (int i = *page + 1; i < num_pages; i ++)
                                           ^
ps-pdf.cxx: In function ‘void parse_heading(tree_t*, float, float, float, float, float*, float*, int*, int)’:
ps-pdf.cxx:4611:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = *page + 1; i < num_pages; i ++)
                                 ^
ps-pdf.cxx:4622:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for (int i = *page + 1; i < num_pages; i ++)
                                 ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-format-truncation" [enabled by default]
Compiling rc4.c...
Compiling zipc.c...
Compiling array.c...
Compiling file.c...
Compiling htmllib.cxx...
Compiling http.c...
Compiling http-addr.c...
Compiling http-addrlist.c...
Compiling http-support.c...
Compiling image.cxx...
image.cxx:1369:3: error: ‘jmp_buf’ does not name a type
   jmp_buf retbuf;  // setjmp() return buffer
   ^
image.cxx: In function ‘int image_load_jpeg(image_t*, FILE*, int, int)’:
image.cxx:1393:19: error: ‘hd_jpeg_err_t’ has no member named ‘retbuf’
   if (setjmp(jerr.retbuf))
                   ^
image.cxx:1393:25: error: ‘setjmp’ was not declared in this scope
   if (setjmp(jerr.retbuf))
                         ^
image.cxx: In function ‘void jpeg_error_handler(j_common_ptr)’:
image.cxx:1857:17: error: ‘hd_jpeg_err_t’ has no member named ‘retbuf’
   longjmp(jerr->retbuf, 1);
                 ^
image.cxx:1857:26: error: ‘longjmp’ was not declared in this scope
   longjmp(jerr->retbuf, 1);
                          ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-format-truncation" [enabled by default]
make[1]: *** [image.o] Error 1
make: *** [all] Error 1

5) run make install, which printed this:

Making all in htmldoc...
Compiling image.cxx...
image.cxx:1369:3: error: ‘jmp_buf’ does not name a type
   jmp_buf retbuf;  // setjmp() return buffer
   ^
image.cxx: In function ‘int image_load_jpeg(image_t*, FILE*, int, int)’:
image.cxx:1393:19: error: ‘hd_jpeg_err_t’ has no member named ‘retbuf’
   if (setjmp(jerr.retbuf))
                   ^
image.cxx:1393:25: error: ‘setjmp’ was not declared in this scope
   if (setjmp(jerr.retbuf))
                         ^
image.cxx: In function ‘void jpeg_error_handler(j_common_ptr)’:
image.cxx:1857:17: error: ‘hd_jpeg_err_t’ has no member named ‘retbuf’
   longjmp(jerr->retbuf, 1);
                 ^
image.cxx:1857:26: error: ‘longjmp’ was not declared in this scope
   longjmp(jerr->retbuf, 1);
                          ^
At global scope:
cc1plus: warning: unrecognized command line option "-Wno-format-truncation" [enabled by default]
make[2]: *** [image.o] Error 1
make[1]: *** [all] Error 1
make: *** [install] Error 2

Any hints on how to solve the 'jmp_buf' does not name a type error would be appreciated, thanks!

@michaelrsweet
Copy link
Owner

@scrameri More than likely this is because you don't have the libpng developer package on your server, and the current code is piggy-backing on pngconf.h's inclusion of <setjmp.h>... I'll push a quick change for this but you probably also want to make sure you have libpng installed as well.

@michaelrsweet michaelrsweet self-assigned this Dec 18, 2021
@michaelrsweet michaelrsweet added the bug Something isn't working label Dec 18, 2021
@michaelrsweet michaelrsweet added this to the Stable milestone Dec 18, 2021
@michaelrsweet
Copy link
Owner

[master 48b605c] Fix builds when libpng is not available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants