vedang / pdf-tools

Emacs support library for PDF files.
https://pdftools.wiki
GNU General Public License v3.0
638 stars 90 forks source link

pdf-tools-20220822.642 failed compilation with pdf-install #141

Closed wilya7 closed 2 years ago

wilya7 commented 2 years ago

On MacOS 10.14.6, with poppler installed. Never had any problem before, compiling pdf-tools. This is what I get with the last update.

-*- Mode: compilation; default-directory: "~/.emacs.d/elpa/pdf-tools-20220822.642/build/server/" -*-
Comint started at Mon Aug 22 13:27:33

/Users/cfusco/.emacs.d/elpa/pdf-tools-20220822.642/build/server/autobuild -i /Users/cfusco/.emacs.d/elpa/pdf-tools-20220822.642/
---------------------------
    Installing packages    
---------------------------
Skipping package installation (already installed)

---------------------------
 Configuring and compiling 
---------------------------
autoreconf -i
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LC_ALL = (unset),
    LANG = "en_CH.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
configure.ac:14: installing './ar-lib'
configure.ac:11: installing './compile'
configure.ac:61: installing './config.guess'
configure.ac:61: installing './config.sub'
configure.ac:6: installing './install-sh'
configure.ac:6: installing './missing'
Makefile.am: installing './depcomp'
./configure -q --bindir=/Users/cfusco/.emacs.d/elpa/pdf-tools-20220822.642/ && make clean && make -s

Is case-sensitive searching enabled ?     yes
Is modifying text annotations enabled ?   yes
Is modifying markup annotations enabled ? yes

test -z "epdfinfo" || rm -f epdfinfo
test -z "libsynctex.a" || rm -f libsynctex.a
rm -f *.o
epdfinfo.c:354:19: warning: 'tempnam' is deprecated: This function is provided for compatibility reasons only. Due to security
      concerns inherent in the design of tempnam(3), it is highly recommended that you use mkstemp(3) instead.
      [-Wdeprecated-declarations]
      filename =  tempnam(NULL, "epdfinfo");
                  ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:306:1: note: 
      'tempnam' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design o...
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/sys/cdefs.h:180:48: note: 
      expanded from macro '__deprecated_msg'
        #define __deprecated_msg(_msg) __attribute__((deprecated(_msg)))
                                                      ^
epdfinfo.c:1383:5: warning: 'poppler_page_get_selection_region' is deprecated: Use poppler_page_get_selected_region instead
      [-Wdeprecated-declarations]
    poppler_page_get_selection_region (page, 1.0, POPPLER_SELECTION_GLYPH, region);
    ^
/opt/local/include/poppler/glib/poppler-page.h:75:134: note: 'poppler_page_get_selection_region' has been explicitly marked deprecated
      here
  ...*page, gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection) G_GNUC_DEPRECATED_FOR(poppler_page_get_selecte...
                                                                                     ^
/opt/local/include/glib-2.0/glib/gmacros.h:635:18: note: expanded from macro 'G_GNUC_DEPRECATED_FOR'
  __attribute__((deprecated("Use " #f " instead")))
                 ^
2 warnings generated.
synctex_parser.c:8421:12: error: static declaration of 'vasprintf' follows non-static declaration
static int vasprintf(char **ret,
           ^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include/stdio.h:381:6: note: 
      previous declaration is here
int      vasprintf(char ** __restrict, const char * __restrict, va_list) __printflike(2, 0);
         ^
1 error generated.
make[1]: *** [libsynctex_a-synctex_parser.o] Error 1
make: *** [all] Error 2
===========================
     Build failed.  ;o(    
===========================
Note: maybe try the '-d' option.

Comint exited abnormally with code 1 at Mon Aug 22 13:27:40
rougier commented 2 years ago

Same problem for me. This seems to have been addressed with latest commit but still fail for me.

wilya7 commented 2 years ago

@rougier

That commit is included in pdf-tools-20220822.642. I think it must have introduced a bug.

rougier commented 2 years ago

Yes, commenting out the added #ifndef HAVE_VASPRINTF make it compile. Probably the AC_CHECK does not catch the system definition of vasprintf.

wilya7 commented 2 years ago

I reverted that commit and indeed now it compiles.

@rougier Thank you, you solved the issue for me.

bknotwell commented 2 years ago

Commenting out the whole pre-processor section (lines 8418 - 8435) fixes the OSX build:

sed '8418s/^/\/* FIXUP /;8435s/$/ FIXUP *\//' $(find ~/.emacs.d -name synctex_parser.c)

vedang commented 2 years ago

Thank you for the issue report. This was introduced in #134 , I am reverting the commit for now and will look into it later.

Will close this issue once the commit is reverted.