erlyaws / yaws

Yaws webserver
https://erlyaws.github.io
BSD 3-Clause "New" or "Revised" License
1.28k stars 267 forks source link

Cannot compile epam.c pm OSx #344

Closed stephb9959 closed 5 years ago

stephb9959 commented 6 years ago

Compiling on OSx causes failure to compile epam.c. The location of pam_appl.h is different on OSx. Simply changing epam.c fixes the issue.

ifdef MACH

include <security/pam_appl.h>

else

include

endif

I have tested this and this fix compiles on OSx and Linuxes.

vinoski commented 6 years ago

Please provide the versions of OS X, yaws, and other relevant code you're using, and also provide the method you're using to build yaws.

I use my Mac for my primary development environment. It currently runs 10.12.6, and it builds yaws master correctly. I just rebuilt it from scratch and had no problem with epam.c. The yaws configure script already contains a test to locate pam_appl.h and make sure the path to it is correct for compilation.

stephb9959 commented 6 years ago

OSx 10.13.6

Fresh clone from https://github.com/klacke/yaws https://github.com/klacke/yaws

Go into yaws, autoreconf -fi, ./configure, make

I did notice that configure picks up pam_appl.h but for some reason, it does not find it during the compile.

BTW, this has worked from scratch in the past on the same machine (1.9x). I compile a lot of open source on this machine (probably like you) and I don't have any issues.

Let me know if I can grab anything else for you... I have another Mac I will try this weekend too.

On Fri, Aug 17, 2018 at 7:12 PM Steve Vinoski notifications@github.com wrote:

Please provide the versions of OS X, yaws, and other relevant code you're using, and also provide the method you're using to build yaws.

I use my Mac for my primary development environment. It currently runs 10.12.6, and it builds yaws master correctly. I just rebuilt it from scratch and had no problem with epam.c. The yaws configure script already contains a test to locate pam_appl.h and make sure the path to it is correct for compilation.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/klacke/yaws/issues/344#issuecomment-414025688, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxfxMYGsLietLPe__0cX6RxQ4FT7-f3ks5uR3fwgaJpZM4WCSjc .

-- Stéphane Bourque

vinoski commented 6 years ago

Perfect, thanks. I tried this on a 10.13.6 box and I see the same issue. Fixing...

vinoski commented 6 years ago

At first I was able to reproduce the problem on 10.13.6, and then I worked on a fix, but now I can no longer reproduce the original problem, even if I completely delete my clone and re-clone.

One thing I did after reproducing the problem that may have affected my ability to reproduce it was that I ran the command

xcode-select --install

in my shell because I wanted to make sure the development environment on that box was up to date.

In the current environment on that machine, the file /usr/include/security/pam_appl.h exists, and the include path directive -I/usr/include/security is always present in the options passed to the C compiler when epam.c is compiled. You can easily verify the options if you run make V=1 to get verbose build output.

stephb9959 commented 6 years ago

Ok Steve. Let me look into mine and tell you after.

I should know later tonite.

On Sat, Aug 18, 2018 at 17:25 Steve Vinoski notifications@github.com wrote:

At first I was able to reproduce the problem on 10.13.6, and then I worked on a fix, but now I can no longer reproduce the original problem, even if I completely delete my clone and re-clone.

One thing I did after reproducing the problem that may have affected my ability to reproduce it was that I ran the command

xcode-select --install

in my shell because I wanted to make sure the development environment on that box was up to date.

In the current environment on that machine, the file /usr/include/security/pam_appl.h exists, and the include path directive -I/usr/include/security is always present in the options passed to the C compiler when epam.c is compiled. You can easily verify the options if you run make V=1 to get verbose build output.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/klacke/yaws/issues/344#issuecomment-414094520, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxfxKGZqCNDGW0zEDM7SaPe9CMDxZIVks5uSLB-gaJpZM4WCSjc .

-- Stéphane Bourque

stephb9959 commented 6 years ago

That solved the issue... I guess just updating the install or readme is sufficient.

Thanks for the easy solution Steve. Really appreciate it.

On Sat, Aug 18, 2018 at 5:27 PM Stephane Bourque stephane.bourque@gmail.com wrote:

Ok Steve. Let me look into mine and tell you after.

I should know later tonite.

On Sat, Aug 18, 2018 at 17:25 Steve Vinoski notifications@github.com wrote:

At first I was able to reproduce the problem on 10.13.6, and then I worked on a fix, but now I can no longer reproduce the original problem, even if I completely delete my clone and re-clone.

One thing I did after reproducing the problem that may have affected my ability to reproduce it was that I ran the command

xcode-select --install

in my shell because I wanted to make sure the development environment on that box was up to date.

In the current environment on that machine, the file /usr/include/security/pam_appl.h exists, and the include path directive -I/usr/include/security is always present in the options passed to the C compiler when epam.c is compiled. You can easily verify the options if you run make V=1 to get verbose build output.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/klacke/yaws/issues/344#issuecomment-414094520, or mute the thread https://github.com/notifications/unsubscribe-auth/ABxfxKGZqCNDGW0zEDM7SaPe9CMDxZIVks5uSLB-gaJpZM4WCSjc .

-- Stéphane Bourque

-- Stéphane Bourque

vinoski commented 6 years ago

You're welcome, and thanks for reporting it and providing the information needed to reproduce it.

In commit d371b82 I've added a little note to the README about xcode-select.