Hello, I installed mongrel2 with 0mq installed at a custom location (/opt/zmq) and had to set $OPTFLAGS to "-L /opt/zmq/lib -I /opt/zmq/include" for things to work well. This doesn't seem to be documented anywhere (say a sections which describes what to do when installing mongrel2 with 0mq installed at a non-default location) so was wondering if it makes sense to include it in the docs. Another thing I noticed is that the make command is prefixed with "sudo" to look like this: "sudo make install". This makes me feel that I need to run it as non-root. Now when I do this, I also do an "export OPTFLAGS=blah" before running this command, but unfortunately, "sudo" screws this up and the var. OPTFLAGS doesn't reflect when "make" is run. What's a good way to fix this? -- -Dhruv Matani. http://dhruvbird.com/ "What's the simplest thing that could possibly work?" -- Ward Cunningham
On 13 July 2011 19:19, Dhruv Matani <dhruvbird@gmail.com> wrote: > Another thing I noticed is that the make command is prefixed with > "sudo" to look like this: "sudo make install". This makes me feel that > I need to run it as non-root. Now when I do this, I also do an "export > OPTFLAGS=blah" before running this command, but unfortunately, "sudo" > screws this up and the var. OPTFLAGS doesn't reflect when "make" is > run. What's a good way to fix this? It is a make variable, so you can just pass it to make directly, i.e.: sudo make OPTFLAGS="-L /opt/zmq/lib -I /opt/zmq/include" install For future reference, though, if you do need to pass environment variables through sudo you can use the env command, i.e.: sudo env OPTFLAGS="-L /opt/zmq/lib -I /opt/zmq/include" make install > -Dhruv Matani. > http://dhruvbird.com/ Cheers, Duane. -- "I never could learn to drink that blood and call it wine" - Bob Dylan
On Thu, Jul 14, 2011 at 12:07 AM, Duane Griffin <duaneg@dghda.com> wrote: > On 13 July 2011 19:19, Dhruv Matani <dhruvbird@gmail.com> wrote: >> Another thing I noticed is that the make command is prefixed with >> "sudo" to look like this: "sudo make install". This makes me feel that >> I need to run it as non-root. Now when I do this, I also do an "export >> OPTFLAGS=blah" before running this command, but unfortunately, "sudo" >> screws this up and the var. OPTFLAGS doesn't reflect when "make" is >> run. What's a good way to fix this? > > It is a make variable, so you can just pass it to make directly, i.e.: > > sudo make OPTFLAGS="-L /opt/zmq/lib -I > /opt/zmq/include" install ah! thanks! > > For future reference, though, if you do need to pass environment > variables through sudo you can use the env command, i.e.: > > sudo env OPTFLAGS="-L /opt/zmq/lib -I > /opt/zmq/include" make install and thanks again! This simplifies things a lot for my scripts :) > >> -Dhruv Matani. >> http://dhruvbird.com/ > > Cheers, > Duane. > > -- > "I never could learn to drink that blood and call it wine" - Bob Dylan > -- -Dhruv Matani. http://dhruvbird.com/ "What's the simplest thing that could possibly work?" -- Ward Cunningham