DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default Problem with building base

Hey,

building latest base from the git mirror gives me the this:
Quote:
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:32:19: error: iconv.h: No such file or directory
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:367: error: expected specifier-qualifier-list before 'iconv_t'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c: In function 'check_iconv_cache':
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:380: error: 'iconv_t' undeclared (first use in this function)
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:380: error: (Each undeclared identifier is reported only once
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:380: error: for each function it appears in.)
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:380: error: expected ';' before 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:386: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:386: error: expected ')' before numeric constant
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:391: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:391: error: expected ')' before numeric constant
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:393: error: 'i' undeclared (first use in this function)
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:393: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:394: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:394: error: expected ';' before numeric constant
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:396: warning: implicit declaration of function 'iconv_close'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:403: warning: implicit declaration of function 'iconv_open'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:407: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c: In function 'cached_iconv_convert':
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:425: error: 'struct cached_iconv' has no member named 'i'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:425: error: 'iconv_t' undeclared (first use in this function)
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:425: error: expected ')' before numeric constant
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:428: warning: implicit declaration of function 'iconv'
/usr/src/gnu/usr.bin/binutils/gdb/charset.c:428: error: 'struct cached_iconv' has no member named 'i'
*** Error 1 in gnu/usr.bin/binutils/obj/gdb (Makefile:973 'charset.o': cc -c -O2 -pipe -DPIE_DEFAULT=1 -I. -I/usr/src/gnu/usr.bin/binu...)
*** Error 2 in gnu/usr.bin/binutils/obj (Makefile:21479 'all-gdb')
*** Error 2 in gnu/usr.bin/binutils (Makefile.bsd-wrapper:46 'all')
*** Error 2 in gnu/usr.bin (<bsd.subdir.mk>:48 'all')
*** Error 2 in gnu (<bsd.subdir.mk>:48 'all')
*** Error 2 in . (<bsd.subdir.mk>:48 'all')
*** Error 1 in . (Makefile:95 'do-build')
*** Error 1 in /usr/src (Makefile:74 'build')
I couldn't find any valuable information on why iconv.h could be missing; this happens regardless of what I have set in mk.conf(5)?

Any hints on what's wrong here? I've build both kernel and base successfully in the past always following release(8) to the word.
Reply With Quote
  #2   (View Single Post)  
Old 4th March 2017
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by kl3 View Post
Any hints on what's wrong here? I've build both kernel and base successfully in the past always following release(8) to the word.
The Git repository is not officially sanctioned, so I suspect that it is not fully synchronized with the project's CVS repository.

My suggestion would be to follow the information in the release(8) manpage,& Section 5 of the official FAQ.
Reply With Quote
  #3   (View Single Post)  
Old 11th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default

I am now using CVS, kernel builds fine as usual but base now fails at this (late in the process):
Quote:
/usr/src/gnu/usr.bin/perl/Configure: .: ../UU/myread: not found
*** Error 1 in gnu/usr.bin/perl (Makefile.bsd-wrapper:76 'config.sh': cd /usr/src/gnu/usr.bin/perl/obj && PATH="/bin:/usr/bin:/sbin:/usr/sbi...)
*** Error 2 in gnu/usr.bin (<bsd.subdir.mk>:48 'depend')
*** Error 2 in gnu (<bsd.subdir.mk>:48 'depend')
*** Error 2 in . (<bsd.subdir.mk>:48 'depend')
*** Error 1 in /usr/src (Makefile:82 'build')
I shall try wether upgrading to the latest snapshot fixes this and report later.
Reply With Quote
  #4   (View Single Post)  
Old 11th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Since the failure is building Perl, I'll guess that your build system is older than the 5 February 2017 update to Perl 5.24.1. A later snapshot will get you past this flag day change.

See the Following -current FAQ for more details.

Last edited by jggimi; 11th March 2017 at 03:03 PM. Reason: typos, added link.
Reply With Quote
  #5   (View Single Post)  
Old 12th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default

This error did indeed not occur prior to that change. Upgrading to/via latest snapshot (bsd*, base*, comp* sets installed) still doesn't fix building:
Quote:
In file included from /usr/src/lib/libcurses/curses.priv.h:81,
from /usr/src/lib/libcurses/tinfo/make_keys.c:42:
/usr/include/unistd.h:524: error: expected declaration specifiers or '...' before 'fd_set'
/usr/include/unistd.h:524: error: expected declaration specifiers or '...' before 'fd_set'
/usr/include/unistd.h:524: error: expected declaration specifiers or '...' before 'fd_set'
*** Error 1 in lib/libcurses (Makefile:129 'make_keys')
*** Error 1 in lib (<bsd.subdir.mk>:48 'depend')
*** Error 1 in /usr/src (Makefile:79 'build')
I used to see this already before the Perl update. I'm really curious what borked my system that way; /usr{,src/}include/unistd.h are the same.
Reply With Quote
  #6   (View Single Post)  
Old 12th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Then, most likely there is something damaged in your source tree. Perhaps something left over from when you were using the github mirror. Delete /usr/src/* and acquire once again.
Reply With Quote
  #7   (View Single Post)  
Old 12th March 2017
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 3,319
Default

Quote:
Originally Posted by jggimi View Post
Delete /usr/src/* and acquire once again.
To add to jggimi's correct response, whenever mirror sources are changed, delete everything obtained at any previous site. The file timestamps will likely not be synchronized. Deleting everything simplifies the problem solving most likely needed later.
Reply With Quote
  #8   (View Single Post)  
Old 13th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default

That's what I already did in the first place: Wiped /usr/src and fetched it through {src,sys}.tar.gz and CVS again.
Reply With Quote
  #9   (View Single Post)  
Old 13th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Ah. When you fetch a tarball, you are getting -release, not -current. Then, when you apply cvs(1) commands, you are overwriting the -release source tree.

It makes some sense to preload a -release tarball when you will be building -stable, but it may be the cause of the problem you are suffering with now, as you are failing to build -current. There certainly could be an application of the checkout on top of -release which leaves something out-of-sorts in your source tree.

Start with an empty /usr/src, and then checkout -current source via cvs(1). See if that makes a difference for you.
Reply With Quote
Old 13th March 2017
e1-531g e1-531g is offline
ISO Quartermaster
 
Join Date: Mar 2014
Posts: 628
Default

Quote:
Originally Posted by kl3 View Post
I am now using CVS, kernel builds fine as usual but base now fails at this (late in the process):


I shall try wether upgrading to the latest snapshot fixes this and report later.
It is clearly stated:
https://www.openbsd.org/faq/current.html
Quote:
Make sure you've read and understand how to build the system from source before using -current and the instructions below.

You should always use a snapshot as the starting point for running -current.
__________________
Signature: Furthermore, I consider that systemd must be destroyed.
Based on Latin oratorical phrase
Reply With Quote
Old 13th March 2017
blackhole's Avatar
blackhole blackhole is offline
Spam Deminer
 
Join Date: Mar 2014
Posts: 320
Default

faq5 is very comprehensive on the whole process, as is the faq for anoncvs.
Reply With Quote
Old 13th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default

Using the latest snapshot as ever for building sources, but still:
Code:
$ what /bsd
/bsd
        OpenBSD 6.1-beta (GENERIC.MP) #1: Mon Mar 13 01:23:27 CET 2017
$ cd /usr
$ ls -ld src
drwxrwxr-x  2 kle  wsrc  512 Mar 13 13:04 src/
$ cvs -Qz6 -d${CVSROOT} co -P src
$ cd src
$ su -m
Password:
# { make -s obj && make -s build; } 1>/dev/null
[warnings...]
The *exact same* iconv.h error from my initial post occurs

Last edited by kl3; 13th March 2017 at 12:59 PM. Reason: Typofix
Reply With Quote
Old 13th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Is there anything in /etc/mk.conf ?

All I can think of is something in your environment that is non-standard, such as building in parallel mode.

If it's empty, I'm out of ideas. While "-s" is non-standard, it shouldn't cause an issue.
Reply With Quote
Old 13th March 2017
kl3 kl3 is offline
New User
 
Join Date: Jan 2017
Posts: 7
Default

/etc/mk.conf does not exist.

Code:
$ make -pC/usr/src | sed /^$/q
#global variables:
.CURDIR          = /usr/src
.MAKE            = make
.MAKEFLAGS       =  -p 
.OBJDIR          = /usr/src
.TARGETS         =  all
AFLAGS           = ${DEBUG}
AR               = ar
ARFLAGS          = r
AS               = as
BINGRP           = bin
BINMODE          = 555
BINOWN           = root
BSDOBJDIR        = /usr/obj
BSDSRCDIR        = /usr/src
BSD_OWN_MK       = Done
BUILDUSER        = build
CC               = cc
CDIAGFLAGS       = -Wall -Wpointer-arith -Wuninitialized -Wstrict-prototypes -Wmissing-prototypes -Wunused -Wsign-compare -Wshadow -Wdeclaration-after-statement
CFLAGS           = -O2 ${PIPE} ${DEBUG}
CLANG_ARCH       = aarch64
COMPILE.F        = ${FC} ${FFLAGS} ${CPPFLAGS} -c
COMPILE.S        = ${CC} ${AFLAGS} ${CPPFLAGS} -c
COMPILE.c        = ${CC} ${CFLAGS} ${CPPFLAGS} -c
COMPILE.cc       = ${CXX} ${CXXFLAGS} ${CPPFLAGS} -c
COMPILE.f        = ${FC} ${FFLAGS} -c
COMPILE.p        = ${PC} ${PFLAGS} ${CPPFLAGS} -c
COMPILE.r        = ${FC} ${FFLAGS} ${RFLAGS} -c
COMPILE.s        = ${CC} ${AFLAGS} -c
COMPILER_VERSION = gcc4
CPP              = cpp
CPPFLAGS         = 
CROSS_TARGETS    = cross-env cross-dirs cross-obj cross-includes cross-binutils  cross-gcc cross-tools cross-lib cross-bin cross-etc-root-var  cross-depend cross-clean cross-cleandir
CTAGS            = /usr/bin/ctags
CXX              = c++
CXXFLAGS         = -O2 ${PIPE} ${DEBUG}
DEFAULT_PIE_DEF  = -DPIE_DEFAULT=1
DIRMODE          = 755
DOCDIR           = /usr/share/doc
DOCGRP           = bin
DOCMODE          = ${NONBINMODE}
DOCOWN           = root
FC               = f77
FFLAGS           = -O2
GCC3_ARCH        = m88k
GNUSYSTEM_AUX_DIR = ${BSDSRCDIR}/share/gnu
HOSTCC           = cc
INSTALL          = install
INSTALL_COPY     = -c
INSTALL_STRIP    = -s
LD               = ld
LDFLAGS          = ${DEBUG}
LEX              = lex
LEX.l            = ${LEX} ${LFLAGS}
LFLAGS           = 
LIBDIR           = /usr/lib
LIBGRP           = ${BINGRP}
LIBMODE          = ${NONBINMODE}
LIBOWN           = ${BINOWN}
LINK.F           = ${FC} ${FFLAGS} ${CPPFLAGS} ${LDFLAGS}
LINK.S           = ${CC} ${AFLAGS} ${CPPFLAGS} ${LDFLAGS}
LINK.c           = ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
LINK.cc          = ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
LINK.f           = ${FC} ${FFLAGS} ${LDFLAGS}
LINK.p           = ${PC} ${PFLAGS} ${CPPFLAGS} ${LDFLAGS}
LINK.r           = ${FC} ${FFLAGS} ${RFLAGS} ${LDFLAGS}
LINK.s           = ${CC} ${AFLAGS} ${LDFLAGS}
LOCALEDIR        = /usr/share/locale
LOCALEGRP        = wheel
LOCALEMODE       = ${NONBINMODE}
LOCALEOWN        = root
LORDER           = lorder
MACHINE          = amd64
MACHINE_ARCH     = amd64
MACHINE_CPU      = amd64
MAKE             = make
MAKEFILE         = Makefile
MAKEFILE_LIST    = /usr/share/mk/sys.mk Makefile /usr/share/mk/bsd.own.mk /usr/share/mk/bsd.subdir.mk
MANDIR           = /usr/share/man/man
MANGRP           = bin
MANMODE          = ${NONBINMODE}
MANOWN           = root
MFLAGS           =   -p 
NONBINMODE       = 444
NOPIE_FLAGS      = -fno-pie
NOPIE_LDFLAGS    = -nopie
OSMAJOR          = 6
OSMINOR          = 1
OSREV            = $(OSMAJOR).$(OSMINOR)
OSrev            = $(OSMAJOR)$(OSMINOR)
PC               = pc
PFLAGS           = 
PICFLAG          = -fpic
PIE_ARCH         = alpha amd64 arm hppa i386 mips64 mips64el powerpc sh sparc64
PIE_DEFAULT      = ${DEFAULT_PIE_DEF}
PIPE             = -pipe
RANLIB           = ranlib
RFLAGS           = 
SHAREDIR         = /usr/share
SHAREGRP         = bin
SHAREMODE        = ${NONBINMODE}
SHAREOWN         = root
SHELL            = /bin/sh
SKEY             = yes
SKIPDIR          = 
STATIC           = -static ${STATICPIE}
STATICPIE        = -pie
STATICPIE_ARCH   = alpha amd64 arm hppa i386 mips64 mips64el powerpc sh sparc64
SUBDIR           = lib include bin libexec sbin usr.bin usr.sbin share games gnu sys
WARNINGS         = no
WOBJGROUP        = wobj
WOBJUMASK        = 007
YACC             = yacc
YACC.y           = ${YACC} ${YFLAGS}
YFLAGS           = -d
YP               = yes
unix             = We run OpenBSD.
Reply With Quote
Old 13th March 2017
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Thank you. Nothing jumps out at me. If others here do not see something I have missed, you might start a thread on the misc@ mailing list to see if a much broader audience -- including about half of the developers -- have any recommendations.
Reply With Quote
Reply

Tags
base source compile


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ftp.fr.openbsd.org not available by base ftp shep OpenBSD Installation and Upgrading 2 6th July 2015 04:38 PM
OpenBSD nginx is going into base ocicat News 1 23rd September 2011 08:23 AM
problem building fluxbox on NetBSD 5.1 with modular X.org Brainfsck NetBSD Package System (pkgsrc) 5 24th August 2011 04:59 PM
OBSD 4.6 Installed - Problem building Kernel for -current IronForge OpenBSD Installation and Upgrading 11 10th November 2009 09:34 PM
Problem Building Openoffice-3 Alphalutra1 FreeBSD Ports and Packages 1 1st May 2009 04:22 AM


All times are GMT. The time now is 07:19 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick