Results 1 to 10 of 10

Thread: Cannot build fcgiwrap - complains about missing file that exists in system

  1. #1

    Question Cannot build fcgiwrap - complains about missing file that exists in system

    OS - openSUSE Tumbleweed

    Hi all,

    Trying to build fcgiwrap is giving me an error about a file that already exists on my system. I downloaded the source code from https://github.com/gnosek/fcgiwrap/tree/master, and ran the following:

    Code:
    user@server:~/fcgiwrap/fcgiwrap> autoreconf -i
    Code:
    user@server:~/fcgiwrap/fcgiwrap> ./configure
    configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
    checking for gcc... gcc
    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 we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking for pkg-config... /usr/bin/pkg-config
    checking pkg-config is at least version 0.9.0... yes
    checking for FCGX_Init in -lfcgi... yes
    checking for systemd... no
    Package systemd was not found in the pkg-config search path.
    Perhaps you should add the directory containing `systemd.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'systemd' found
    checking how to run the C preprocessor... gcc -E
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking for stdlib.h... (cached) yes
    checking for string.h... (cached) yes
    checking for unistd.h... (cached) yes
    checking for stdbool.h that conforms to C99... yes
    checking for _Bool... yes
    checking for pid_t... yes
    checking for size_t... yes
    checking for ssize_t... yes
    checking vfork.h usability... no
    checking vfork.h presence... no
    checking for vfork.h... no
    checking for fork... yes
    checking for vfork... yes
    checking for working fork... yes
    checking for working vfork... (cached) yes
    checking whether lstat correctly handles trailing slash... yes
    checking for stdlib.h... (cached) yes
    checking for GNU libc compatible malloc... yes
    checking for strchr... yes
    checking for strdup... yes
    checking for strrchr... yes
    checking for dup2... yes
    checking for putenv... yes
    checking for select... yes
    checking for setenv... yes
    checking for strerror... yes
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    Code:
    user@server:~/fcgiwrap/fcgiwrap> make
    cc -std=gnu99 -Wall -Wextra -Werror -pedantic -O2 -g3    fcgiwrap.c  -lfcgi  -o fcgiwrap
    fcgiwrap.c:30:24: fatal error: fcgi_stdio.h: No such file or directory
     #include <fcgi_stdio.h>
                            ^
    compilation terminated.
    <builtin>: recipe for target 'fcgiwrap' failed
    make: *** [fcgiwrap] Error 1
    Now, the file fcgi_stdio.h exists in my system:

    Code:
    user@server:~/fcgiwrap/fcgiwrap> locate fcgi_stdio.h
    /usr/include/fastcgi/fcgi_stdio.h
    It was installed via the FastCGI-devel package:
    Code:
    user@server:~/fcgiwrap/fcgiwrap> sudo zypper se -f fcgi_stdio.h
    Loading repository data...
    Reading installed packages...
    
    S | Name          | Summary                           | Type
    --+---------------+-----------------------------------+--------
    i | FastCGI-devel | A scalable, open extension to CGI | package
    What am I doing wrong?

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,088
    Blog Entries
    15

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    Hi
    Use configure --help, and either set the include path to 'add' /usr/include/fastcgi or edit the relevant file showing the error to
    Code:
    #include <fastcgi/fcgi_stdio.h>
    Also install systemd-devel to avoid the configure error.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Cannot build fcgiwrap - complains about missing file that existsin system

    On 2015-06-08 00:46, sinayion wrote:

    Code:
    
    >   checking for systemd... no
    >   Package systemd was not found in the pkg-config search path.
    >   Perhaps you should add the directory containing `systemd.pc'
    >   to the PKG_CONFIG_PATH environment variable
    >   No package 'systemd' found
    Possibly you also need systemd devel package.

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  4. #4

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    Thank to both of you. I get now how the include line works with respect to the OS filesystem

    I'm assuming the correct way for a packager to fix this, is to leave the original source unmodified, and then somehow with the %prep section (in the spec file) to replace the offending file? Or is it ok to just modify the source for our distribution?

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: Cannot build fcgiwrap - complains about missing file that existsin system

    On 2015-06-08 04:26, sinayion wrote:
    > I'm assuming the correct way for a packager to fix this, is to leave the
    > original source unmodified, and then somehow with the %prep section (in
    > the spec file) to replace the offending file? Or is it ok to just modify
    > the source for our distribution?


    I'm out of my league here, so I'll just venture a guess :-)

    The correct thing is to correct the configure script so that it properly
    locates the needed files or signals their absence. And make those
    changes upstream.

    Just a guess. Better wait for Malcolm :-)

    --
    Cheers / Saludos,

    Carlos E. R.

    (from 13.1 x86_64 "Bottle" (Minas Tirith))

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,760

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    I assume that that header file is not on the path so how is it be found? Generally the complier will look in the current make director then if not found search the path. I suggest you copy the file or make a link to your build directory

  7. #7
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,088
    Blog Entries
    15

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    Quote Originally Posted by sinayion View Post
    Thank to both of you. I get now how the include line works with respect to the OS filesystem

    I'm assuming the correct way for a packager to fix this, is to leave the original source unmodified, and then somehow with the %prep section (in the spec file) to replace the offending file? Or is it ok to just modify the source for our distribution?
    Hi
    Create a patch with diff, extract the source and rename the folder to 'a' extract the source again and call the folder 'b', then modify the file in folder 'b' as required and run the following command to create the patch;

    Code:
    diff -Naur a b > fastcgi-update-include-path.patch
    Then in the spec file after the Source line add;

    Code:
    # PATCH-FIX-OPENSUSE fastcgi-update-include-path.patch <your_email> -- Update include path to fcgi_stdio.h.
    Patch0:     fastcgi-update-include-path.patch
    Then in the %prep section after the %setup add;

    Code:
    %patch0 -p1
    Then finally in your fastcgi.changes file add;

    Code:
    - Add fastcgi-update-include-path.patch: Update include path
      to fcgi_stdio.h.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,088
    Blog Entries
    15

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    Quote Originally Posted by gogalthorp View Post
    I assume that that header file is not on the path so how is it be found? Generally the complier will look in the current make director then if not found search the path. I suggest you copy the file or make a link to your build directory
    Hi
    Noooooo, very bad form Either the configure --help option will show a include variable to use with configure to point it to the correct location eg;
    Code:
    ./configure --prefix=/usr --fastcgi_include_path=/usr/include/fastcgi
    It maybe the autoconf is changing something, else the pkgconfig is broken in it's detection of the relevant pc file, but not using it to add the full include path which is listed there.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,371
    Blog Entries
    2

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    You downloaded your code from github.

    The proper way to offer a fix is
    1. Fork the original repository by clicking on the "Fork" icon on the original repository. This creates your own copy under your own account, but preserves the hierarchy remembering where the original exists.

    2. Make your changes directly to your forked repository. From the sounds of what you did, you'll be making changes to the configure file and adding "systemd-devel" to the prerequisites. If the configure file doesn't check for prerequisites(It seems to only produce an error), then it should be described generally in a README file.

    3. After you've finished making your changes, go back to the original repo's website and click on the tab that opens "Pull requests" describing in detail what changes you're contributing.

    After the author(s) of the original project evaluate your contribution, they may go ahead and accept your changes... They'll pull those changes from your forked repository. You'll then also join the community of contributors!

    Good Luck on having your changes accepted!

    TSU

  10. #10
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,371
    Blog Entries
    2

    Default Re: Cannot build fcgiwrap - complains about missing file that exists in system

    Got to thinking if you're very new working with github repositories, it's very common to know how to clone and download from a repo, but the ability to make changes and push to github is a bit beyond typical newbie knowledge.

    I recently described steps these steps in a very rough draft how to do this at
    Section: The basic steps for interacting with a github repository
    http://putztzu.github.io/testweb/
    Ignore most of everything above in that article which describes how to set up connecting to a special "gh-pages" branch for deploying web pages. You don't want to do that, you'll be making changes to the main branch which is set up by default.

    Overall steps:
    - Fork the original repository
    - "git clone" your own new repository to create a local copy on your machine
    - Edit the files, if need be add files. If you remove files, you can't delete normally but must use "git rm" command

    To upload your changes

    Captures all files you may have added for staging. If no files have been added, it's still OK to run. Notice the hard to see period in the command
    Code:
    git add .
    Stages your repo for uploading. Enter your descriptive comment so people know what you changed.
    Code:
    git commit -am " your comment "
    Push your changes to github.com. By originally cloning your local repo, you've already setup the URI. You will be prompted for your Username and Password (and if missing to set some local global parameters the first time)
    Code:
    git push
    Inspect your results in your repo at github.com using a web browser.

    HTH,
    TSU

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •