Opened 10 years ago

Last modified 10 years ago

#41942 assigned submission

nemiver @0.9.5 new Portfile

Reported by: juanrgar (Juan R. García Blanco) Owned by: dbevans (David B. Evans)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: nemiver

Description

It requires a big patch to compile on 10.9 since with the libc++ all tr1 classes are gone. I plan to split this patch into several smaller pieces and send them to the nemiver mailing list. Also, although I think nemiver only relies on gdb and glib, mainly, I've observed the following issues:

  • A log message is printed indicating that nemiver couldn't obtain process information.
  • Hitting the Run button after loading a binary makes nemiver enter an unusable state and a lot of glib warning messages are printed.

However, the main functionality I think it's there: stepping in and out, registers values, variables values, output console, ...

Attachments (4)

nemiver-Portfile.tgz (5.7 KB) - added by juanrgar (Juan R. García Blanco) 10 years ago.
patch-Portfile.diff (2.0 KB) - added by dbevans (David B. Evans) 10 years ago.
Preliminary patch for Portfile
patch-nemiver-intltool.diff (637 bytes) - added by dbevans (David B. Evans) 10 years ago.
Patch to fix intltool configuration
nemiver-Portfile.2.tgz (6.7 KB) - added by juanrgar (Juan R. García Blanco) 10 years ago.
Latest Portfile + patches

Download all attachments as: .zip

Change History (21)

Changed 10 years ago by juanrgar (Juan R. García Blanco)

Attachment: nemiver-Portfile.tgz added

comment:1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

The build fails on OS X 10:8 with:

make[2]: Entering directory `/Volumes/Data/macports/mountainlion/var/macports/build/_private_tmp_nemiver/nemiver/work/nemiver-0.9.5/help'
Makefile:543: *** missing separator.  Stop.
make[2]: Leaving directory `/Volumes/Data/macports/mountainlion/var/macports/build/_private_tmp_nemiver/nemiver/work/nemiver-0.9.5/help'

Line 543 of help/Makefile reads:

@YELP_HELP_RULES@

So this is a placeholder that didn't get replaced. This presumably relates to yelp, which I don't have installed. I'm installing the yelp port to see if that helps.

comment:2 in reply to:  1 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to ryandesign@…:

I'm installing the yelp port to see if that helps.

Nope.

Also the configure phase includes this output:

./configure: line 17151: YELP_HELP_INIT: command not found

comment:3 Changed 10 years ago by dbevans (David B. Evans)

Try adding yelp-tools as a build dependency.

comment:4 Changed 10 years ago by dbevans (David B. Evans)

Cc: devans@… added

Cc Me!

comment:5 Changed 10 years ago by dbevans (David B. Evans)

A few more things

  • at first look, depends_build and depends_lib seem to be reversed (those things in depends_lib appear to properly be build deps and vice-versa)
  • if that's true then does itstool really need to be in both categories since it doesn't install any libraries. If it's used by the port at run-time, perhaps it should be a run dep.
  • a post-activate phase needs to added to properly finish installation for the gconf schemas and probably some other things as well (hicolor icons, desktop file(s), etc.)

comment:6 Changed 10 years ago by dbevans (David B. Evans)

GConf has been deprecated for some time and should only be used for legacy support. Use gsettings instead.

  • replace gconf dependency with dconf
  • set configuration option --enable-gsettings=yes
  • replace --disable-schemas-install with --disable-schemas-compile
  • add lib dependency on gsettings-desktop-schemas

Additionally, you should use

use_autoreconf yes
autoreconf.args -fvi

to take advantage of your patch modifications to configure.ac, Makefile.am, and the like.

Since the version number has an odd minor number, for livecheck to work properly you should use

livecheck.type gnome-with-unstable

rather than

livecheck.type gnome

Finally for Help to work, yelp needs to be installed at runtime. Additionally, gnome-settings-daemon is also needed at runtime for GNOME theming to work properly. It is normally run as part of the GNOME session startup initiated by gnome-session. However, for testing, you can run it by hand with the command

${prefix}/libexec/gnome-settings-daemon --replace &

With all these changes, the port builds, installs and runs for me on OS X 10.8.5. Have not done any significant testing or tried Mavericks as yet.

See attachment for a preliminary patch that makes the changes I have suggested to your Portfile.

Last edited 10 years ago by dbevans (David B. Evans) (previous) (diff)

Changed 10 years ago by dbevans (David B. Evans)

Attachment: patch-Portfile.diff added

Preliminary patch for Portfile

comment:7 Changed 10 years ago by juanrgar (Juan R. García Blanco)

Sorry, I did noticed the yelp-tools dependency but for some reason I didn't include it in the Portfile. Also, as you noticed I didn't put much care in the Portfile, sorry.

Anyways, you've answered all the questions I had about GNOME Portfiles, thank you very much :) Now I need to study in detail all this info.

I've patched my local Portfile and it builds fine on Mavericks, but for some reason I can't get the application window to show up, although I can't see any error. I'll continue working from this point and see if I can get it showing up in 10.9.

Thank you very much again :)

comment:8 Changed 10 years ago by dbevans (David B. Evans)

No problem. Thanks for all your work on this. Will try and take a look over the weekend after I get some other things in order and let you know if I have the same experience on Mavericks. There's a number of GNOME packages that are left to port -- just take a look at the comments in gnome3-core and/or gnome3-apps. Any help rounding out our GNOME offering and keeping it up to date is greatly appreciated.

comment:9 Changed 10 years ago by dbevans (David B. Evans)

Cc: devans@… removed
Owner: changed from macports-tickets@… to devans@…
Status: newassigned

By the way, I'm guessing that the inability to obtain process information is due to problems in libgtop. Other ports that depend on it have some problems (e.g. gnome-system-monitor, gnome-control-center) and I suspect there are some OS X specific fixes that need to be done. libgtop's functionality WRT OS X needs to be verified in detail and fixed if necessary.

At any rate, I'll be glad to commit this port for you when you get the bugs worked out.

comment:10 Changed 10 years ago by dbevans (David B. Evans)

Need to add dependency on new port gdlmm3. This will ensure that the dynamic layout feature is always enabled, not just when this port happens to be installed.

Similarly adding a dependency on port ghex will ensure that the memory view feature is always enabled.

If you don't want these features then you need to explicitly disable them in configure.args. I would leave them enabled since the default behavior of the port is to enable them if the required dependencies are available.

comment:11 Changed 10 years ago by juanrgar (Juan R. García Blanco)

[Quick update] These are the issues I've been identified until now. I'll take a look at them asap.

  • It doesn't work when gsettings is selected as config manager.
  • Line numbers are not shown.
  • Hitting 'Run or Restart' fails with

(nemiver:35525): GLib-WARNING **: poll(2) failed due to: Bad file descriptor.

  • This warning always shows up when starting nemiver

nmv-gdb-engine.cc:2226:failed to extract proc info

comment:12 Changed 10 years ago by juanrgar (Juan R. García Blanco)

I got nemiver to show up with gsettings, by setting ::width to 0. I'll investigate why is this happening; if I don't get a clue, the probably the easiest solution is to set ::width to 0 in the Portfile after activation.

Changed 10 years ago by dbevans (David B. Evans)

Attachment: patch-nemiver-intltool.diff added

Patch to fix intltool configuration

comment:13 Changed 10 years ago by dbevans (David B. Evans)

Attached is an additional patch to fix intltool configuration. Without this patch, if perl5 and intltool's variants do not match, build will fail during the configure phase. Assuming you have the default intltool +perl5_16 installed, you can test by installing perl5 +perl5_12. Configure will fail without the patch and succeed with it.

Note the missing dependency on intltool.

Any further progress on your end?

comment:14 Changed 10 years ago by juanrgar (Juan R. García Blanco)

Not much. I've created a patch to configure.ac to remove the dconf dependency. Then, if I run it with my big monitor connected to my MBP I can't see the window, it falls outside the display; if I run nemiver with my monitor attached, I can see the window without problem. I'd like to try to fix this. I'll keep you posted.

Changed 10 years ago by juanrgar (Juan R. García Blanco)

Attachment: nemiver-Portfile.2.tgz added

Latest Portfile + patches

comment:15 Changed 10 years ago by juanrgar (Juan R. García Blanco)

I just submitted the current Portfile version plus the two current patches. Although one of the patches removes the dconf dependency in configure.ac, I can't locate where nemiver stores its settings; I expected to see a ~/Library/Preferences/nemiver.plist, as for other gsettings apps.

I haven't debugged any of the other issues, namely 'line numbers not showing', 'run or restart button fails', and 'failed to extract proc info'.

comment:16 Changed 10 years ago by dbevans (David B. Evans)

Updated my wip branch to this latest version in r117825.

comment:17 Changed 10 years ago by dbevans (David B. Evans)

Moved port from wip branch to GNOME3/stable in r119585.
Added dependency on gconf to fix configure error in r119596.

The dependency on gconf is necessary because configure.ac uses the macro AM_GCONF_SOURCE_2 provided by this port. Even though the use of this macro is limited to a conditional block that is not executed when building with gsettings support, the absense of the macro causes a autoreconf error when it tries to regenerate configure. gconf is not necessary otherwise.

A better solution might be to just remove the gconf specific code block that uses this macro from configure.ac with another patch.

With this change, nemiver builds successfully for me and starts up without errors. Loading and executing an executable file built with symbols works and the result is source listing with line numbers with a break at the first executable line of main(). However, clicking on a button to step or continue at this point seems to do nothing. I can set additional break points. If I click Run at this point I get a stream of warning errors like this on the terminal

(nemiver:75824): GLib-WARNING **: poll(2) failed due to: Bad file descriptor.

(nemiver:75824): GLib-WARNING **: poll(2) failed due to: Bad file descriptor.

(nemiver:75824): GLib-WARNING **: poll(2) failed due to: Bad file descriptor.

(nemiver:75824): GLib-WARNING **: poll(2) failed due to: Bad file descriptor.

... and so on

Abort with cntl-C on the terminal gives

|E|int main(int, char **):/opt/local/var/macports/build/_opt_macports_users_devans_GNOME-3_stable_dports_gnome_nemiver/nemiver/work/nemiver-0.9.5/src/main.cc:742:Bad file descriptor

Code at this location

    gtk_kit.run (s_workbench->get_root_window ());

--> NEMIVER_CATCH_NOX
    s_workbench = 0;

My current test effort is trying to see if I can debug gnome-screenshot using nemiver. Not much progress so far as you can see.

Note: See TracTickets for help on using tickets.