New Ticket     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #15844 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

cgdb 0.6.4 Build failure

Reported by: nacho319@… Owned by: macsforever2000@…
Priority: Normal Milestone:
Component: ports Version: 1.6.0
Keywords: cgdb curses Cc: bob_rossi@…, mike@…, christophe.laferriere@…
Port: cgdb

Description

It seems that cgdb's build flags choose the wrong OS for curses compatibility, leading to a compile error:

Making all in various
Making all in util
Making all in src
if gcc -DHAVE_CONFIG_H -I. -I. -I../../..   -I/opt/local/include -I./../include -O2 -MT pseudo.o -MD -MP -MF ".deps/pseudo.Tpo" -c -o pseudo.o pseudo.c; \
	then mv -f ".deps/pseudo.Tpo" ".deps/pseudo.Po"; else rm -f ".deps/pseudo.Tpo"; exit 1; fi
pseudo.c: In function ‘pty_open’:
pseudo.c:338: error: ‘I_PUSH’ undeclared (first use in this function)
pseudo.c:338: error: (Each undeclared identifier is reported only once
pseudo.c:338: error: for each function it appears in.)
pseudo.c: At top level:
pseudo.c:736: fatal error: opening dependency file .deps/pseudo.Tpo: Permission denied
compilation terminated.
make[4]: *** [pseudo.o] Error 1

which corresponds to this snippet of code for cgdb getting a pseudo tty I believe:

	/* Turn the slave into a terminal */

#ifndef HAVE_CYGWIN 
#ifndef HAVE_LINUX /* linux does not use the streams module */
	/*
	 * Push the appropriate streams modules, as described in Solaris pts(7).
	 * HP-UX pts(7) doesn't have ttcompat module.
	 */
	if (ioctl(*slavefd, I_PUSH, "ptem") == -1)
	{
		close(*masterfd);
		close(*slavefd);
		return -1;
	}

	if (ioctl(*slavefd, I_PUSH, "ldterm") == -1)
	{
		close(*masterfd);
		close(*slavefd);
		return -1;
	}

#ifndef __hpux
	if (ioctl(*slavefd, I_PUSH, "ttcompat") == -1)
	{
		close(*masterfd);
		close(*slavefd);
		return -1;
	}
#endif
#endif
#endif

Attachments

patch-various-util-src-pseudo.c.diff Download (0.7 KB) - added by jauricchio@… 3 years ago.
Quick hack to get it to compile

Change History

Changed 4 years ago by macsforever2000@…

  • cc jfrederich@… added

Cc: maintainer.

Changed 4 years ago by ryandesign@…

  • cc jfrederich@… removed
  • owner changed from macports-tickets@… to jfrederich@…

Assigning to maintainer.

Changed 3 years ago by dweber@…

  • cc bob_rossi@…, mike@… added

Adding the cgdb maintainers so we might get some action on this ticket and get it working for OSX.

Maybe the configure options can be adapted to avoid this build error.

Changed 3 years ago by christophe.laferriere@…

  • cc christophe.laferriere@… added

Cc Me!

Changed 3 years ago by anonymous

  • milestone Port Bugs deleted

Milestone Port Bugs deleted

Changed 3 years ago by jauricchio@…

Quick hack to get it to compile

Changed 3 years ago by jauricchio@…

Here's a simple patch to kludge around the code the original reporter mentioned. Compiles and launches. Not tested yet; I'm new to cgdb but if I encounter tty-related bugs or oddness, I'll see if they're caused by my changes and report back here.

This code is from  libslack, not cgdb proper. There has been a new release of libslack, and it claims to support OS X. A good fix would be a patch to bring cgdb in line with whatever libslack does to build on OS X. A better fix would be getting upstream cgdb to update their libslack.

Changed 3 years ago by macsforever2000@…

  • port set to cgdb

Changed 3 years ago by macsforever2000@…

  • status changed from new to assigned
  • owner changed from jfrederich@… to macsforever2000@…

Maintainer timeout.

Changed 3 years ago by macsforever2000@…

  • status changed from assigned to closed
  • resolution set to fixed

Committed revision r52098. Now it compiles and runs. Thanks!

Note: See TracTickets for help on using tickets.