Bug 79354 - domc-0.8.0 fails to build on FreeBSD-4.11
Summary: domc-0.8.0 fails to build on FreeBSD-4.11
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Thierry Thomas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-30 07:00 UTC by jau
Modified: 2005-05-02 09:00 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jau 2005-03-30 07:00:10 UTC
      Find below the full output from make in textproc/domc...

===>  Vulnerability check disabled, database not found
===>  Extracting for domc-0.8.0
=> Checksum OK for domc-0.8.0.tar.gz.
===>  Patching for domc-0.8.0
===>  Applying FreeBSD patches for domc-0.8.0
===>   domc-0.8.0 depends on executable: gmake - found
===>   domc-0.8.0 depends on shared library: expat.5 - found
===>   domc-0.8.0 depends on shared library: mba.1 - found
===>  Configuring for domc-0.8.0
===>  Building for domc-0.8.0
cc -O -pipe  -I/usr/local/include -Wall -W -g -DMSGNO -I/usr/local/include -L/usr/local/lib -c -o src/expatls.o src/expatls.c
In file included from src/expatls.c:37:
src/domc.h:41: stdint.h: No such file or directory
In file included from src/expatls.c:37:
src/domc.h:59: syntax error before `DOM_TimeStamp'
src/domc.h:59: warning: type defaults to `int' in declaration of `DOM_TimeStamp'
src/domc.h:59: warning: data definition has no type or storage class
src/domc.h:322: syntax error before `DOM_TimeStamp'
src/expatls.c: In function `xmldecl_fn':
src/expatls.c:146: syntax error before `)'
src/expatls.c:151: syntax error before `)'
src/expatls.c: In function `doctype_start_fn':
src/expatls.c:176: syntax error before `)'
src/expatls.c:180: syntax error before `)'
src/expatls.c:185: syntax error before `)'
src/expatls.c:191: syntax error before `)'
src/expatls.c:196: syntax error before `)'
src/expatls.c:202: syntax error before `)'
src/expatls.c: In function `entdecl_fn':
src/expatls.c:311: syntax error before `)'
src/expatls.c:317: syntax error before `)'
src/expatls.c:330: syntax error before `)'
src/expatls.c:335: syntax error before `)'
src/expatls.c:341: syntax error before `)'
src/expatls.c:347: syntax error before `)'
src/expatls.c:352: syntax error before `)'
src/expatls.c: In function `notationdecl_fn':
src/expatls.c:377: syntax error before `)'
src/expatls.c:383: syntax error before `)'
src/expatls.c:389: syntax error before `)'
src/expatls.c:395: syntax error before `)'
src/expatls.c:400: syntax error before `)'
src/expatls.c: In function `start_fn':
src/expatls.c:432: syntax error before `)'
src/expatls.c:436: syntax error before `)'
src/expatls.c:441: syntax error before `)'
src/expatls.c:445: syntax error before `)'
src/expatls.c:456: syntax error before `)'
src/expatls.c: In function `chardata_fn':
src/expatls.c:501: syntax error before `)'
src/expatls.c:506: syntax error before `)'
src/expatls.c:511: syntax error before `)'
src/expatls.c: In function `comment_fn':
src/expatls.c:539: syntax error before `)'
src/expatls.c: In function `processing_fn':
src/expatls.c:568: syntax error before `)'
src/expatls.c:572: syntax error before `)'
src/expatls.c: In function `DOM_DocumentLS_fread':
src/expatls.c:643: syntax error before `;'
src/expatls.c:658: syntax error before `)'
src/expatls.c:594: warning: `n' might be used uninitialized in this function
src/expatls.c: In function `fputds_encoded':
src/expatls.c:733: syntax error before `)'
src/expatls.c: In function `DOM_DocumentLS_fwrite':
src/expatls.c:862: syntax error before `)'
gmake: *** [libdomc.a(src/expatls.o)] Error 1
*** Error code 2

Stop in /opt/ports/textproc/domc.

Fix: 

None known yet.
How-To-Repeat:       Launch make in textproc/domc on FreeBSD 4.11.
Comment 1 Volker Stolz freebsd_committer freebsd_triage 2005-03-31 08:03:06 UTC
State Changed
From-To: open->closed

libmba is no longer supported on 4.x. You are probably building with 
an older version (also, domc itself seems to be incompatible with 4.x) 
which, as you observed, doesn't help. Sorry, there's not much we can do.
Comment 2 Jukka A. Ukkonen 2005-04-01 16:49:40 UTC
	OK - as requested by Volker Stolz I submit patches via the gnats
	system.
	Here are fixes to both domc-0.8.0 and libmba-0.8.10 which domc
	depends on.

	1) domc-0.8.0

--- Makefile.orig	Thu Mar 31 18:44:47 2005
+++ Makefile	Thu Mar 31 18:52:43 2005
@@ -32,4 +32,10 @@

  PLIST_SUB=	SHLIB_MAJOR="${SHLIB_MAJOR}"

-.include <bsd.port.mk>
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} < 500000
+USE_GCC=        3.4
+.endif
+
+.include <bsd.port.post.mk>
--- work/domc-0.8.0/src/domc.h.orig	Wed Mar 30 09:06:18 2005
+++ work/domc-0.8.0/src/domc.h	Wed Mar 30 09:06:46 2005
@@ -33,7 +33,9 @@
  #include <errno.h>
  #include <time.h>

-#if defined(__sparc__)
+#if defined(__FreeBSD__)
+  #include <inttypes.h>
+#elif defined(__sparc__)
    #include <sys/inttypes.h>
  #elif defined(_WIN32)
    typedef unsigned __int64 uint64_t;


	2) libmba-0.8.10

--- Makefile.orig	Thu Mar 31 18:59:15 2005
+++ Makefile	Thu Mar 31 19:00:59 2005
@@ -34,8 +34,12 @@

  .include <bsd.port.pre.mk>

-.if ${OSVERSION} < 500039
-IGNORE=		requires wchar functions for compilation
+#.if ${OSVERSION} < 500039
+#IGNORE=		requires wchar functions for compilation
+#.endif
+
+.if ${OSVERSION} < 500000
+USE_GCC=	3.4
  .endif

  post-patch:
--- work/libmba-0.8.10/src/text.c.orig	Thu Mar 31 19:03:36 2005
+++ work/libmba-0.8.10/src/text.c	Thu Mar 31 19:04:53 2005
@@ -22,6 +22,8 @@
   * OTHER DEALINGS IN THE SOFTWARE.
   */

+#include <sys/types.h>
+#include <stdarg.h>
  #include <stdlib.h>
  #include <stdio.h>
  #include <stddef.h>
--- work/libmba-0.8.10/src/mba/time.h.orig2	Fri Apr  1 18:35:28 2005
+++ work/libmba-0.8.10/src/mba/time.h	Fri Apr  1 18:35:59 2005
@@ -20,7 +20,9 @@
  #endif /* WIN32 */
  #endif /* LIBMBA_API */

-#if defined(__sparc__) && ! (defined (__FreeBSD__))
+#if defined(__FreeBSD__)
+  #include <inttypes.h>
+#elif defined(__sparc__)
    #include <sys/inttypes.h>
  #elif defined(_WIN32)
    #define MILLISECONDS_BETWEEN_1970_AND_1601 11644473600000Ui64


	I hope this helps.

	// jau
Comment 3 Volker Stolz freebsd_committer freebsd_triage 2005-04-01 17:01:53 UTC
State Changed
From-To: closed->open

Reopen - we've got patches!
Comment 4 Sam Lawrance 2005-04-08 14:07:40 UTC
I did the last update on domc and libmba, happy to check this over.
Comment 5 Sam Lawrance 2005-04-09 15:26:29 UTC
Okay, it seems that your patches do get libmba and domc to compile, but
there are still no wide character functions available and so they won't
link.

When compiling, you'll see warnings like this:

gcc34 -Wall -W -ansi -DMSGNO  -D__BSD_VISIBLE -Isrc -I/usr/local/include
-L/usr/local/lib -O -pipe  -I/usr/local/include -c src/csv.c -o
src/csv.o
src/csv.c: In function `csv_parse_wcs':
src/csv.c:218: warning: implicit declaration of function `iswspace'
ar rv libmba.a src/csv.o

These are non-fatal because the compiler just assumes the implicit
function returns an int. The library will build, install and package OK.

But when it comes to actually linking and running a program, it won't
work because those wide char functions aren't available:

bash-2.05b# make
#gcc -g -Wall -W -DPROFILE -DMSGNO -I/usr/local/include -L/usr/local/lib
-ldomc -lmba -lencdec -lmba -lexpat -ldomc -o dump.o dump.c
gcc -g -Wall -W -DPROFILE -DMSGNO -I/usr/local/include -L/usr/local/lib
-ldomc -lmba -o dump.o dump.c
/usr/local/lib/libdomc.so: undefined reference to `mbrtowc'
/usr/local/lib/libmba.so: undefined reference to `iswspace'
/usr/local/lib/libmba.so: undefined reference to `towupper'
*** Error code 1
Comment 6 Thierry Thomas freebsd_committer freebsd_triage 2005-04-10 14:59:09 UTC
State Changed
From-To: open->feedback


Since devel/libmba has been marked IGNORE on FreeBSD < 500039, 
and since textproc/domc depends on libmba, I think that we 
should close this PR, if you agree. 



Comment 7 Thierry Thomas freebsd_committer freebsd_triage 2005-04-10 14:59:09 UTC
Responsible Changed
From-To: freebsd-ports-bugs->thierry


Take follow-ups.
Comment 8 Thierry Thomas freebsd_committer freebsd_triage 2005-04-10 22:01:05 UTC
State Changed
From-To: feedback->closed


Committed, thanks! 

(and sorry for the noise: checked on FreeBSD-4.11 and FreeBSD-5.3)
Comment 9 Sam Lawrance freebsd_committer freebsd_triage 2005-04-21 07:48:51 UTC
Thierry,

Can you please review the changes made under this PR?  I think that domc
and libmba should remain IGNOREd on 4.x, given that compiling with them
will fail at the link stage.

Repeat on 4.x:

cd /usr/ports/textproc/domc
make install

cat << EOF > test.c
int main(int argc, char** argv) {};
EOF

gcc34 -ldomc test.c

What do you think?
Comment 10 Thierry Thomas freebsd_committer freebsd_triage 2005-04-30 20:21:05 UTC
Le Jeu 21 avr 05 à  8:48:51 +0200, Sam Lawrance <lawrance@FreeBSD.org>
 écrivait :
> Can you please review the changes made under this PR?  I think that domc
> and libmba should remain IGNOREd on 4.x, given that compiling with them
> will fail at the link stage.
> 
> Repeat on 4.x:
> 
> cd /usr/ports/textproc/domc
> make install
> 
> cat << EOF > test.c
> int main(int argc, char** argv) {};
> EOF
> 
> gcc34 -ldomc test.c
> 
> What do you think?

You're right: I have set it back to IGNORE.

Regards,
-- 
Th. Thomas.
Comment 11 jau 2005-05-02 08:52:31 UTC
Quoting Thierry Thomas:
> 
> Le Jeu 21 avr 05 à  8:48:51 +0200, Sam Lawrance <lawrance@FreeBSD.org>
>  écrivait :
> > Can you please review the changes made under this PR?  I think that domc
> > and libmba should remain IGNOREd on 4.x, given that compiling with them
> > will fail at the link stage.
> > 
> > Repeat on 4.x:
> > 
> > cd /usr/ports/textproc/domc
> > make install
> > 
> > cat << EOF > test.c
> > int main(int argc, char** argv) {};
> > EOF
> > 
> > gcc34 -ldomc test.c
> > 
> > What do you think?
> 
> You're right: I have set it back to IGNORE.
> 
> Regards,
> -- 
> Th. Thomas.

	Oops! It seems I might have been using my own unpublished
	wide character library in my LD_LIBRARY_PATH while testing.
	So, I did not really notice 4.x is still lacking publicly
	available wchar_t support. ;-)
	Maybe I should call this a handicap of having my own personal
	STDC library implementation. Sometimes my environment might
	just by accident do things which the OS natively cannot do.

	This whole issue was largely prompted by the fact that vinum
	is not yet really operational on 5.x. As a result I still do
	a lot of things on 4.11.
	Were vinum production quality on 5.4, I would not even have
	tried libmba and domc on 4.11.


	Cheers,
		// jau
.---  ..-  -.-  -.-  .-    .-  .-.-.-    ..-  -.-  -.-  ---  -.  .  -.
  /    Jukka A. Ukkonen,                            Mawit Ltd, Finland
 /__   M.Sc. (sw-eng & cs)                    (Phone) +358-500-606-671
   /   Internet: Jukka.Ukkonen(a)Mawit.Com      (Home) +358-9-6215-280
  /    Internet: ukkonen(a)nic.funet.fi
 v     Internet: jau(a)iki.fi
        .---  .-  ..-  ...-.-  ..  -.-  ..  .-.-.-  ..-.  ..
+ + + + My opinions are mine and mine alone, not my employers. + + + +