edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev]  compiling edbrowse with js24
@ 2014-01-29 22:16 Karl Dahlke
  0 siblings, 0 replies; 9+ messages in thread
From: Karl Dahlke @ 2014-01-29 22:16 UTC (permalink / raw)
  To: Edbrowse-dev

I unpacked it in /usr/local, just to make sure it's where it belongs.
Then make install did indeed put headers in /usr/local/include
and libs in /usr/local/lib.
One odd thing though, I already have /usr/local/lib in /etc/ld.so.conf,
so I figured it would link and run without trouble,
but I had to run ldconfig again, after the mozjs-24 lib was installed,
for it to connect.
Don't know if that's normal or not.

Karl Dahlke

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 23:41       ` Chris Brannon
@ 2014-01-30 10:33         ` Adam Thompson
  0 siblings, 0 replies; 9+ messages in thread
From: Adam Thompson @ 2014-01-30 10:33 UTC (permalink / raw)
  To: Chris Brannon; +Cc: Edbrowse Development

On Wed, Jan 29, 2014 at 03:41:24PM -0800, Chris Brannon wrote:
> Chuck Hallenbeck <chuckh@ftml.net> writes:
> 
> So don't modify the makefile.  I'd suggest a script like this one:
> 
> #!/bin/sh
> # ebmake, build edbrowse
> # Expects to be run from the root of the edbrowse tree,
> 
> LDFLAGS=-L/usr/local/lib make JS_CXXFLAGS=/usr/local/include/mozjs-24
> # End of script.
> 
> This is sort of how we do things when packaging for distributions.
> Typically, we don't write patches against the makefile, because they're
> fragile.  It's better to set variables or flip configure switches.
> Since edbrowse doesn't have a configure script, we end up setting
> environment variables, or in the case of JS_CXXFLAGS, "make" variables.
> Don't make the mistake of using JS_CXXFLAGS as an environment variable,
> because make will override it.

Good point.

> Instead, it needs to be passed after the make command, so make will do
> the substitution:
> make JS_CXXFLAGS=whatever

You may also want to add -Wno-invalid-offsetof to the JS_CXXFLAGS variable to
prevent *lots* of warnings about stuff in various mozjs-24 headers.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 22:57     ` Chuck Hallenbeck
  2014-01-29 23:41       ` Chris Brannon
@ 2014-01-30 10:21       ` Adam Thompson
  1 sibling, 0 replies; 9+ messages in thread
From: Adam Thompson @ 2014-01-30 10:21 UTC (permalink / raw)
  To: Chuck Hallenbeck; +Cc: Edbrowse Development

On Wed, Jan 29, 2014 at 05:57:59PM -0500, Chuck Hallenbeck wrote:
> On Wed, 29 Jan 2014, Chris Brannon wrote:
> 
> > Adam Thompson <arthompson1990@gmail.com> writes:
> >
> > > Where did it install to?
> >
> > Looks like it uses autotools, so my guess is under /usr/local.  Chuck,
> > I'd look under /usr/local/include/mozjs-24 for the headers and
> > /usr/local/lib for the libraries.
> 
> Yes, that's where they were.
> 
> Next question: If I modify the edbrowse makefile to add those flags, what
> happens to my modifications when the makefile iks updated?

Git complains about uncommitted changes and you have to revert your changes.
You shouldn't need to modify the makefile anyway,
see my previous message for how to build without doing this.
That, and dependancy tracking, are the two big advantages of using make over a
build shell script in my opinion.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 22:57     ` Chuck Hallenbeck
@ 2014-01-29 23:41       ` Chris Brannon
  2014-01-30 10:33         ` Adam Thompson
  2014-01-30 10:21       ` Adam Thompson
  1 sibling, 1 reply; 9+ messages in thread
From: Chris Brannon @ 2014-01-29 23:41 UTC (permalink / raw)
  To: Edbrowse Development

Chuck Hallenbeck <chuckh@ftml.net> writes:

> Next question: If I modify the edbrowse makefile to add those flags, what
> happens to my modifications when the makefile iks updated?

Well, they get erased!
So don't modify the makefile.  I'd suggest a script like this one:

#!/bin/sh
# ebmake, build edbrowse
# Expects to be run from the root of the edbrowse tree,

LDFLAGS=-L/usr/local/lib make JS_CXXFLAGS=/usr/local/include/mozjs-24
# End of script.

This is sort of how we do things when packaging for distributions.
Typically, we don't write patches against the makefile, because they're
fragile.  It's better to set variables or flip configure switches.
Since edbrowse doesn't have a configure script, we end up setting
environment variables, or in the case of JS_CXXFLAGS, "make" variables.
Don't make the mistake of using JS_CXXFLAGS as an environment variable,
because make will override it.
Instead, it needs to be passed after the make command, so make will do
the substitution:
make JS_CXXFLAGS=whatever

-- Chris

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Edbrowse-dev]  compiling edbrowse with js24
@ 2014-01-29 23:08 Karl Dahlke
  0 siblings, 0 replies; 9+ messages in thread
From: Karl Dahlke @ 2014-01-29 23:08 UTC (permalink / raw)
  To: Edbrowse-dev

Chuck writes:

> Next question: If I modify the edbrowse makefile to add those flags,

Well you're right you don't want to do that.
I find these aliases helpful.
Put in your .bashrc file.

#  make edbrowse and edbrowseodbc
alias mkeb="make JS_CXXFLAGS=-I/usr/local/include/mozjs-24 JSLIB=-lmozjs-24 edbrowse"
alias mkeo="make JS_CXXFLAGS=-I/usr/local/include/mozjs-24 JSLIB=-lmozjs-24 edbrowseodbc"

Karl Dahlke

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 22:05   ` Chris Brannon
@ 2014-01-29 22:57     ` Chuck Hallenbeck
  2014-01-29 23:41       ` Chris Brannon
  2014-01-30 10:21       ` Adam Thompson
  0 siblings, 2 replies; 9+ messages in thread
From: Chuck Hallenbeck @ 2014-01-29 22:57 UTC (permalink / raw)
  To: Chris Brannon; +Cc: Edbrowse Development

Hi,

On Wed, 29 Jan 2014, Chris Brannon wrote:

> Adam Thompson <arthompson1990@gmail.com> writes:
>
> > Where did it install to?
>
> Looks like it uses autotools, so my guess is under /usr/local.  Chuck,
> I'd look under /usr/local/include/mozjs-24 for the headers and
> /usr/local/lib for the libraries.

Yes, that's where they were.

Next question: If I modify the edbrowse makefile to add those flags, what
happens to my modifications when the makefile iks updated?

Chuck


>
> -- Chris
>

-- 

 Chuck, now in Ghent: (northeast of Hudson on the Hudson)


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 13:44 ` Adam Thompson
@ 2014-01-29 22:05   ` Chris Brannon
  2014-01-29 22:57     ` Chuck Hallenbeck
  0 siblings, 1 reply; 9+ messages in thread
From: Chris Brannon @ 2014-01-29 22:05 UTC (permalink / raw)
  To: Chuck Hallenbeck, Edbrowse Development

Adam Thompson <arthompson1990@gmail.com> writes:

> Where did it install to?

Looks like it uses autotools, so my guess is under /usr/local.  Chuck,
I'd look under /usr/local/include/mozjs-24 for the headers and
/usr/local/lib for the libraries.

-- Chris

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Edbrowse-dev] compiling edbrowse with js24
  2014-01-29 12:12 Chuck Hallenbeck
@ 2014-01-29 13:44 ` Adam Thompson
  2014-01-29 22:05   ` Chris Brannon
  0 siblings, 1 reply; 9+ messages in thread
From: Adam Thompson @ 2014-01-29 13:44 UTC (permalink / raw)
  To: Chuck Hallenbeck; +Cc: Edbrowse Development

Hi Chuck,

On Wed, Jan 29, 2014 at 07:12:10AM -0500, Chuck Hallenbeck wrote:
> Hi all,
> I retrieved and compiled the js24 sources, using the default instructions +
> "make install", apparently successfully (no fatal errors, numerous
> warnings)

Where did it install to?

> 
> I retrieved the master branch of edbrowse from git after Adam's pushes
> yesterday, but the compile failed when jsapi.h could not be found.
> 
> "locate" shows the existence of jsapi.h under /usr/include/js and also
> /usr/include/js-17.0, apparently from earlier versions from the arch
> repositories, and other jsapi.h files under the source directories for
> js24.
> 
> I'm wondering if I need to add a link somewhere to point to the new jsapi.h
> files?

No, simply set JS_CXXFLAGS and JSLIB to point to your new mozjs24 installation.
On my system, I install custom libs under ~/usr so this looks like:
make JS_CXXFLAGS=-I/home/adam/usr/include/mozjs-24 JSLIB="-L/home/adam/usr/lib -lmozjs-24"

You also have to have the custom library path (in my case /home/adam/usr/lib) on your LD_LIBRARY_PATH for this to work.

Alternatively, if you've installed under /usr/local (default I think):
make JS_CXXFLAGS=-I/usr/local/include/mozjs-24 JSLIB=-lmozjs-24

For debugging (assuming a debug build of mozjs already):
CFLAGS="-g -gdb" CXXFLAGS="-g -gdb" make <js_settings> STRIP=""

Where <js_settings> is the js set up required to make things compile.

Cheers,
Adam.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Edbrowse-dev] compiling edbrowse with js24
@ 2014-01-29 12:12 Chuck Hallenbeck
  2014-01-29 13:44 ` Adam Thompson
  0 siblings, 1 reply; 9+ messages in thread
From: Chuck Hallenbeck @ 2014-01-29 12:12 UTC (permalink / raw)
  To: Edbrowse Development

Hi all,

I must have overlooked something, and need suggestions.

I retrieved and compiled the js24 sources, using the default instructions +
"make install", apparently successfully (no fatal errors, numerous
warnings)

I retrieved the master branch of edbrowse from git after Adam's pushes
yesterday, but the compile failed when jsapi.h could not be found.

"locate" shows the existence of jsapi.h under /usr/include/js and also
/usr/include/js-17.0, apparently from earlier versions from the arch
repositories, and other jsapi.h files under the source directories for
js24.

I'm wondering if I need to add a link somewhere to point to the new jsapi.h
files?

Any ideas would be appreciated.

Chuck


-- 

 Chuck, now in Ghent: (northeast of Hudson on the Hudson)


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-01-30 10:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-29 22:16 [Edbrowse-dev] compiling edbrowse with js24 Karl Dahlke
  -- strict thread matches above, loose matches on Subject: below --
2014-01-29 23:08 Karl Dahlke
2014-01-29 12:12 Chuck Hallenbeck
2014-01-29 13:44 ` Adam Thompson
2014-01-29 22:05   ` Chris Brannon
2014-01-29 22:57     ` Chuck Hallenbeck
2014-01-29 23:41       ` Chris Brannon
2014-01-30 10:33         ` Adam Thompson
2014-01-30 10:21       ` Adam Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).