• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

Php52-pfSense-module build error

Scheduled Pinned Locked Moved Development
4 Posts 4 Posters 3.9k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T
    thunderbolt
    last edited by Aug 28, 2010, 3:31 AM

    Hi everyone,

    I'm hoping someone can give me some pointers on how to fix this.

    I've just installed a new FreeBSD 8.1 build system for building 2.0, and I'm running into one issue/error with the build that I can't seem to fix or find anything else about.  The pfPorts php52-pfSense-module will not build.  It encounters an error about NGM_ETHER_ATTACH being undefined.  When I search the netgraph information, I can find the associated NGM_ETHER_DETACH, but it appears there is no NGM_ETHER_ATTACH message truly defined for the NgSendMsg call.

    The error is happening on line 739 of pfSense.c in this module.

    Am I missing something in my build environment, or is there a recent change that has broken this module?

    I was going to try to fix it myself and submit a patch, but I'm not exactly sure what to change since I'm unfamiliar with netgraph.  Any pointers would be helpful, or if someone else knows exactly what to do to fix it that would be great too.

    Thanks,
    Ron

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Aug 30, 2010, 2:18 PM

      There are some netgraph patches that need to be on the base system, iirc, before it will work right.

      Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

      Need help fast? Netgate Global Support!

      Do not Chat/PM for help!

      1 Reply Last reply Reply Quote 0
      • _
        __nicolas__
        last edited by Sep 9, 2010, 10:25 PM

        Hi all,

        I encountered the same error.

        I cut&paste the patch files i have added to tools/pfPorts/php52-pfSense-module/files/patch-config.m4 to get it compile on FreeBSD-8.1 on vmware ;-)

        
        --- ./config.m4.orig    2010-09-09 15:29:01.000000000 +0200
        +++ ./config.m4 2010-09-09 15:29:20.000000000 +0200
        @@ -1,9 +1,21 @@
         PHP_ARG_ENABLE(pfSense, whether to enable pfSense support,
        -[ --enable-pfSense   Enable pfSense support])
        +[  --enable-pfSense   Enable pfSense support])
        +
        +PHP_ARG_WITH(pfsense-kernel, where pfSense kernel sources are located,
        +[  --with-pfsense-kernel=DIR    Location of git kernel sources])
        
         PHP_SUBST(PFSENSE_SHARED_LIBADD)
         PHP_ADD_LIBRARY_WITH_PATH(netgraph, /usr/lib, PFSENSE_SHARED_LIBADD)
         if test "$PHP_PFSENSE" = "yes"; then
           AC_DEFINE(HAVE_PFSENSE, 1, [Whether you have pfSense])
           PHP_NEW_EXTENSION(pfSense, pfSense.c, $ext_shared)
        +  dnl Check for the custom kernel dir
        +  if test "$PHP_PFSENSE_KERNEL" != "no"; then
        +    if test "$PHP_PFSENSE_KERNEL" == "yes"; then
        +      AC_MSG_ERROR([You must specify a path when using --with-pfsense-kernel])
        +    fi
        +
        +    PHP_ADD_INCLUDE($PHP_PFSENSE_KERNEL/sys)
        +  fi
        +
         fi
        
        

        Then, I added into Makefile:
        CONFIGURE_ARGS= –enable-pfSense --with-pfsense-kernel=/usr/pfsense-src/src

        Because "system" /usr/src/sys does not have the right patch level to get module compiled.

        Do not forget to change the /usr/pfsense-src/src dir if you have not checkout kernel sources here.

        The module compile now cleanly, but php failed to launch because it needs a ng_socket.ko module at runtime (not loaded in my released kernel ).
        I am looking for fixing that dependency too..

        If any has another solution, he is welcome :-)

        Nicolas.

        Nicolas

        1 Reply Last reply Reply Quote 0
        • E
          eri--
          last edited by Sep 15, 2010, 1:36 PM

          You can do this from the port itself no need to do that in the C sources.
          Just hack up the Makefile of the port.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received