All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-04 11:24 [Buildroot] Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf Faisal Mehmood
@ 2018-09-04  8:20 ` Thomas Petazzoni
       [not found]   ` <CAL8qisnsRCYbC5+x8GAT+wZ_qiB=6EGBUVkK=GRk0JHy-T4ifA@mail.gmail.com>
  0 siblings, 1 reply; 8+ messages in thread
From: Thomas Petazzoni @ 2018-09-04  8:20 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 4 Sep 2018 11:24:53 +0000, Faisal Mehmood wrote:

> ################################1#1#1#1#1#1#1#1#1#1########################
> 
> /home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
> In function `_start':
> (.text+0x54): undefined reference to `main'
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:850: ../lib/libncurses.so.6.0] Error 1
> make[2]: Leaving directory
> '/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/ncurses'
> make[1]: *** [Makefile:114: all] Error 2
> make[1]: Leaving directory
> '/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0'
> make: *** [package/pkg-generic.mk:226:
> /home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/.stamp_built]
> Error 2
> 
> ################################1#1#1#1#1#1#1#1#1#1########################

This one looks a bit weird. Are you sure you are getting this after a
full rebuild, i.e "make clean all" ?

> lib/fseterr.c: In function 'fseterr':
> lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to
> your platform! Look at the definitions of ferror and clearerr on your
> system, then report this to bug-gnulib."
>   #error "Please port gnulib fseterr.c to your platform! Look at the
> definitions of ferror and clearerr on your system, then report this to
> bug-gnulib."
>    ^~~~~

What is your host system ? I guess it's a pretty new one, which uses
glibc-2.28. This issue has been fixed in master in commit
373ac58b82d2430b745e90c7c8b39e319949882a, but it hasn't been backported
yet to our 2018.02.x branch. It will be backported soon by Peter
Korsgaard, who maintains the 2018.02.x branch.

> ##############################3#3#3#3#3#3#3#3#3#3#3#3#######################
> /home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc
> -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -fPIE
> -Wl,-z,now -Wl,-z,relro -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> -D_FILE_OFFSET_BITS=64  -Os  -fPIC -fPIC -D_LARGEFILE64_SOURCE=1
> -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo
> infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
> compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
> -pie
> /home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
> In function `_start':
> (.text+0x54): undefined reference to `main'
> collect2: error: ld returned 1 exit status

Same issue as for ncurses, building shared libraries doesn't work.
Again, are you sure this happens after a full rebuild, i.e "make clean
all".

If that happens after a full rebuild, could you provide:

 - Details on your host system

 - Your Buildroot .config file

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
@ 2018-09-04 11:24 Faisal Mehmood
  2018-09-04  8:20 ` Thomas Petazzoni
  0 siblings, 1 reply; 8+ messages in thread
From: Faisal Mehmood @ 2018-09-04 11:24 UTC (permalink / raw)
  To: buildroot

Hi

I want to use buildroot to build a minimal rootfs with a handful of
GUI software and libraries for my raspberry pi 3 system.

I downloaded buildroot-2018.02.5 and enabled some libraries and
software. 'make' produced an error [1]. Given that the error was
related to ncurses, I straight away disabled it to get to a clean
build. However, disabling ncurses threw another error about bison [2].

A little google-fu told me that perhaps i'd have to apply some patch
to get it working. Since I'm pretty new to all this, I proceeded to
downloading the latest rc version, hoping that the issue would have
been resolved.

So then I downloaded buildroot-2018.08-rc3. Luckily, this time bison
compiled just fine. However, I got an error at a later stage [3].

What I want to ask is that is there a way to get going without facing
compilation errors? I got into kernel compilation a few weeks ago. The
only difficult thing was to find out what options to enable and what
options to disable. Compilation itself was breezy.

Please help me find a way to buildroot compilation where I don't have
to apply patches or solve compilation errors.

Kind regards,
m3hm00d

################################1#1#1#1#1#1#1#1#1#1########################

/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
In function `_start':
(.text+0x54): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:850: ../lib/libncurses.so.6.0] Error 1
make[2]: Leaving directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/ncurses'
make[1]: *** [Makefile:114: all] Error 2
make[1]: Leaving directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0'
make: *** [package/pkg-generic.mk:226:
/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/.stamp_built]
Error 2

################################1#1#1#1#1#1#1#1#1#1########################


################################2#2#2#2#2#2#2#2#2#2########################
make[3]: Entering directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/host-bison-3.0.4'
  CC       lib/wait-process.o
  CC       lib/wctype-h.o
  CC       lib/xmalloc.o
  CC       lib/xalloc-die.o
  CC       lib/xconcat-filename.o
  CC       lib/xsize.o
  CC       lib/xstrndup.o
  CC       lib/abitset.o
  CC       lib/bitset.o
  CC       lib/bitset_stats.o
  CC       lib/bitsetv.o
  CC       lib/ebitset.o
  CC       lib/lbitset.o
  CC       lib/vbitset.o
  CC       lib/bitsetv-print.o
  CC       lib/timevar.o
  CC       lib/get-errno.o
  CC       lib/asnprintf.o
  CC       lib/fcntl.o
  CC       lib/fprintf.o
  CC       lib/fseterr.o
  CC       lib/isnand.o
  CC       lib/isnanf.o
  CC       lib/isnanl.o
  CC       lib/obstack.o
  CC       lib/printf.o
lib/fseterr.c: In function 'fseterr':
lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to
your platform! Look at the definitions of ferror and clearerr on your
system, then report this to bug-gnulib."
  #error "Please port gnulib fseterr.c to your platform! Look at the
definitions of ferror and clearerr on your system, then report this to
bug-gnulib."
   ^~~~~
make[3]: *** [Makefile:3466: lib/fseterr.o] Error 1
make[3]: *** Waiting for unfinished jobs....
  CC       lib/printf-args.o
make[3]: Leaving directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/host-bison-3.0.4'
make[2]: *** [Makefile:4522: all-recursive] Error 1
make[2]: Leaving directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/host-bison-3.0.4'
make[1]: *** [Makefile:2625: all] Error 2
make[1]: Leaving directory
'/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/host-bison-3.0.4'
make: *** [package/pkg-generic.mk:226:
/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/host-bison-3.0.4/.stamp_built]
Error 2

################################2#2#2#2#2#2#2#2#2#2########################


##############################3#3#3#3#3#3#3#3#3#3#3#3#######################
/home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc
-shared -Wl,-soname,libz.so.1,--version-script,zlib.map -fPIE
-Wl,-z,now -Wl,-z,relro -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64  -Os  -fPIC -fPIC -D_LARGEFILE64_SOURCE=1
-DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo
infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
-pie
/home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
In function `_start':
(.text+0x54): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:282: libz.so.1.2.11] Error 1
make[1]: Leaving directory
'/home/kenobi/Downloads/buildroot-2018.08-rc3/output/build/libzlib-1.2.11'
make: *** [package/pkg-generic.mk:232:
/home/kenobi/Downloads/buildroot-2018.08-rc3/output/build/libzlib-1.2.11/.stamp_built]
Error 2

##############################3#3#3#3#3#3#3#3#3#3#3#3#######################

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

* [Buildroot] Fwd:  Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
       [not found]   ` <CAL8qisnsRCYbC5+x8GAT+wZ_qiB=6EGBUVkK=GRk0JHy-T4ifA@mail.gmail.com>
@ 2018-09-04 15:32     ` Faisal Mehmood
  2018-09-04 20:17       ` Arnout Vandecappelle
  0 siblings, 1 reply; 8+ messages in thread
From: Faisal Mehmood @ 2018-09-04 15:32 UTC (permalink / raw)
  To: buildroot

---------- Forwarded message ---------
From: Faisal Mehmood <f.m3hm00d@gmail.com>
Date: Tue, Sep 4, 2018 at 3:31 PM
Subject: Re: [Buildroot] Beginner help: Compilation errors for bison,
ncurses and arm-buildroot-linux-uclibcgnueabihf
To: <thomas.petazzoni@bootlin.com>


On Tue, Sep 4, 2018 at 8:20 AM Thomas Petazzoni
<thomas.petazzoni@bootlin.com> wrote:
>
> Hello,
>
> On Tue, 4 Sep 2018 11:24:53 +0000, Faisal Mehmood wrote:
>
> > ################################1#1#1#1#1#1#1#1#1#1########################
> >
> > /home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
> > In function `_start':
> > (.text+0x54): undefined reference to `main'
> > collect2: error: ld returned 1 exit status
> > make[2]: *** [Makefile:850: ../lib/libncurses.so.6.0] Error 1
> > make[2]: Leaving directory
> > '/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/ncurses'
> > make[1]: *** [Makefile:114: all] Error 2
> > make[1]: Leaving directory
> > '/home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0'
> > make: *** [package/pkg-generic.mk:226:
> > /home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/build/ncurses-6.0/.stamp_built]
> > Error 2
> >
> > ################################1#1#1#1#1#1#1#1#1#1########################
>
> This one looks a bit weird. Are you sure you are getting this after a
> full rebuild, i.e "make clean all" ?
>
> > lib/fseterr.c: In function 'fseterr':
> > lib/fseterr.c:77:3: error: #error "Please port gnulib fseterr.c to
> > your platform! Look at the definitions of ferror and clearerr on your
> > system, then report this to bug-gnulib."
> >   #error "Please port gnulib fseterr.c to your platform! Look at the
> > definitions of ferror and clearerr on your system, then report this to
> > bug-gnulib."
> >    ^~~~~
>
> What is your host system ? I guess it's a pretty new one, which uses
> glibc-2.28. This issue has been fixed in master in commit
> 373ac58b82d2430b745e90c7c8b39e319949882a, but it hasn't been backported
> yet to our 2018.02.x branch. It will be backported soon by Peter
> Korsgaard, who maintains the 2018.02.x branch.
>
> > ##############################3#3#3#3#3#3#3#3#3#3#3#3#######################
> > /home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/bin/arm-buildroot-linux-uclibcgnueabihf-gcc
> > -shared -Wl,-soname,libz.so.1,--version-script,zlib.map -fPIE
> > -Wl,-z,now -Wl,-z,relro -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
> > -D_FILE_OFFSET_BITS=64  -Os  -fPIC -fPIC -D_LARGEFILE64_SOURCE=1
> > -DHAVE_HIDDEN -o libz.so.1.2.11 adler32.lo crc32.lo deflate.lo
> > infback.lo inffast.lo inflate.lo inftrees.lo trees.lo zutil.lo
> > compress.lo uncompr.lo gzclose.lo gzlib.lo gzread.lo gzwrite.lo  -lc
> > -pie
> > /home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
> > In function `_start':
> > (.text+0x54): undefined reference to `main'
> > collect2: error: ld returned 1 exit status
>
> Same issue as for ncurses, building shared libraries doesn't work.
> Again, are you sure this happens after a full rebuild, i.e "make clean
> all".
>
> If that happens after a full rebuild, could you provide:
>
>  - Details on your host system
>
>  - Your Buildroot .config file
>

Build Station 1:
---------------------
Arch linux x64
gcc (GCC) 8.2.1 20180831
ldd (GNU libc) 2.28
Linux 4.18.5
buildroot-2018.08-rc3

Build Station 2:
-----------------------
Debian on VirtualBox
gcc 6.3.2 20170516
ldd (Debian Glibc) 2.24
Linux 4.9.0
buildroot-2018.02.5

I was told over at #buildroot that glibc 2.28 has issues with
buildroot. Since my host (Arch Linux) used 2.28, I was advised to give
Debian (Glibc 2.24) a go.

FYI, I deleted the entire buildroot folder and started compilation from scratch.

On Build Station 1, I again got an error [4] after starting from scratch.

On Build Station 2, although it was a new debian install on virtual
machine, I still got an error [5]

Please visit [6] for my .config file. The file was huge so I didn't
upload it here in text.

The thing that keeps repeating in these errors is Scrt1.o.

Regards,
m3hm00d

##########################4#4#4#4#4#4#4#4#4#4############################
/home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
In function `_start':
(.text+0x54): undefined reference to `main'
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:282: libz.so.1.2.11] Error 1
make[1]: Leaving directory
'/home/kenobi/Downloads/buildroot-2018.08-rc3/output/build/libzlib-1.2.11'
make: *** [package/pkg-generic.mk:232:
/home/kenobi/Downloads/buildroot-2018.08-rc3/output/build/libzlib-1.2.11/.stamp_built]
Error 2
##########################4#4#4#4#4#4#4#4#4#4############################

##########################5#5#5#5#5#5#5#5#5#5############################
/home/kenobid/Downloads/buildroot-2018.02.5/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
In function `_start':
(.text+0x54): undefined reference to `main'
collect2: error: ld returned 1 exit status
Makefile:849: recipe for target '../lib/libncurses.so.6.0' failed
make[2]: *** [../lib/libncurses.so.6.0] Error 1
make[2]: Leaving directory
'/home/kenobid/Downloads/buildroot-2018.02.5/output/build/ncurses-6.0/ncurses'
Makefile:113: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory
'/home/kenobid/Downloads/buildroot-2018.02.5/output/build/ncurses-6.0'
package/pkg-generic.mk:223: recipe for target
'/home/kenobid/Downloads/buildroot-2018.02.5/output/build/ncurses-6.0/.stamp_built'
failed
make: *** [/home/kenobid/Downloads/buildroot-2018.02.5/output/build/ncurses-6.0/.stamp_built]
Error 2
##########################5#5#5#5#5#5#5#5#5#5############################


[6] https://drive.google.com/drive/folders/1eFVrGFUF2IY_p3PD6glK5K68wDw52INY

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

* [Buildroot] Fwd: Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-04 15:32     ` [Buildroot] Fwd: " Faisal Mehmood
@ 2018-09-04 20:17       ` Arnout Vandecappelle
  2018-09-05 10:51         ` Faisal Mehmood
  0 siblings, 1 reply; 8+ messages in thread
From: Arnout Vandecappelle @ 2018-09-04 20:17 UTC (permalink / raw)
  To: buildroot

 Hi Faisal,

On 04/09/2018 17:32, Faisal Mehmood wrote:
> ---------- Forwarded message ---------
> From: Faisal Mehmood <f.m3hm00d@gmail.com>
> Date: Tue, Sep 4, 2018 at 3:31 PM
> Subject: Re: [Buildroot] Beginner help: Compilation errors for bison,
> ncurses and arm-buildroot-linux-uclibcgnueabihf
> To: <thomas.petazzoni@bootlin.com>
> 
> 
> On Tue, Sep 4, 2018 at 8:20 AM Thomas Petazzoni
> <thomas.petazzoni@bootlin.com> wrote:
>>
>> Hello,
>>
>> On Tue, 4 Sep 2018 11:24:53 +0000, Faisal Mehmood wrote:
>>
>>> ################################1#1#1#1#1#1#1#1#1#1########################
>>>
>>> /home/kenobi/projects/zero/rootfs/buildroot-2018.02.5/output/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/lib/Scrt1.o:
>>> In function `_start':
>>> (.text+0x54): undefined reference to `main'
>>> collect2: error: ld returned 1 exit status
>>> make[2]: *** [Makefile:850: ../lib/libncurses.so.6.0] Error 1

 As Thomas mentioned, for some reason you don't seem to be able to build a
shared library.

 To debug this, could you re-run (without cleaning) with BR2_DEBUG_WRAPPER=1 in
the environment? And also make it verbose, with V=1. And disable parallel build. So

BR2_DEBUG_WRAPPER=1 make V=1 BR2_JLEVEL=1

 If you haven't cleaned, the entire output is relevant (it would contain just
the commands that are run leading up to the failure).

[snip]
>>  - Your Buildroot .config file

 To make it smaller, you can run 'make savedefconfig' and include that in the mail.

 But anyway, the interesting bit is

BR2_RELRO_FULL=y

Full relro is currently broken. See the bug report [1] and the patches to fix it
[2].

 Regards,
 Arnout

[1] https://bugs.busybox.net/show_bug.cgi?id=11206
[2] http://patchwork.ozlabs.org/project/buildroot/list/?series=63203


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

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

* [Buildroot] Fwd: Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-05 10:51         ` Faisal Mehmood
@ 2018-09-05  6:19           ` Vadim Kochan
  2018-09-05 12:24             ` Faisal Mehmood
  0 siblings, 1 reply; 8+ messages in thread
From: Vadim Kochan @ 2018-09-05  6:19 UTC (permalink / raw)
  To: buildroot

Hi Faisal!

On Wed, Sep 5, 2018 at 8:53 AM Faisal Mehmood <f.m3hm00d@gmail.com> wrote:
>
> On Tue, Sep 4, 2018 at 8:18 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> >
> >
> >  As Thomas mentioned, for some reason you don't seem to be able to build a
> > shared library.
> >
> >  To debug this, could you re-run (without cleaning) with BR2_DEBUG_WRAPPER=1 in
> > the environment? And also make it verbose, with V=1. And disable parallel build. So
> >
> > BR2_DEBUG_WRAPPER=1 make V=1 BR2_JLEVEL=1
>
> Running this make on (uncleaned) Build Station 1, I got the same error
> as before. No difference in output other than a bit more logs.
>
> >
> > [snip]
> > >>  - Your Buildroot .config file
> >
> >  To make it smaller, you can run 'make savedefconfig' and include that in the mail.
> >
> >  But anyway, the interesting bit is
> >
> > BR2_RELRO_FULL=y
> >
> > Full relro is currently broken. See the bug report [1] and the patches to fix it
> > [2].
>
> Thanks for the very helpful input. I set BR2_RELRO_PARTIAL=y after
> reading the bug report. Building clean on Build Station 1, it managed
> to avoid the earlier errors. So that's a win. But at a later stage of
> compilation I got a new error [7].
>
> I set BR2_RELRO_NONE=y on Build Station 2. That build is under way.
> I'll let you know the results.
>
> Could someone suggest a recommended distro and buildroot version that
> I could run without having to face these compilation errors?
>

Could you provide config generated by 'make savedefconfig' ? So I can try it out
to check on my environment.

Regards,
Vadim Kochan

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

* [Buildroot] Fwd: Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-05 12:24             ` Faisal Mehmood
@ 2018-09-05  8:42               ` Baruch Siach
  0 siblings, 0 replies; 8+ messages in thread
From: Baruch Siach @ 2018-09-05  8:42 UTC (permalink / raw)
  To: buildroot

Hi Faisal,

On Wed, Sep 05, 2018 at 12:24:00PM +0000, Faisal Mehmood wrote:
> On Wed, Sep 5, 2018 at 6:13 AM Vadim Kochan <vadim4j@gmail.com> wrote:
> > Could you provide config generated by 'make savedefconfig' ? So I can try 
> > it out to check on my environment.
>
> As stupid as it sounds, I am not able to find out where 'make
> savedefconfig' saves the defconfig file.

The defconfig is saved in the file that your BR2_DEFCONFIG points at. By 
default, this is the 'defconfig' file in the top level Buildroot source tree.

See this and other details on make targets with 'make help'.

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -

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

* [Buildroot] Fwd: Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-04 20:17       ` Arnout Vandecappelle
@ 2018-09-05 10:51         ` Faisal Mehmood
  2018-09-05  6:19           ` Vadim Kochan
  0 siblings, 1 reply; 8+ messages in thread
From: Faisal Mehmood @ 2018-09-05 10:51 UTC (permalink / raw)
  To: buildroot

On Tue, Sep 4, 2018 at 8:18 PM Arnout Vandecappelle <arnout@mind.be> wrote:
>
>
>  As Thomas mentioned, for some reason you don't seem to be able to build a
> shared library.
>
>  To debug this, could you re-run (without cleaning) with BR2_DEBUG_WRAPPER=1 in
> the environment? And also make it verbose, with V=1. And disable parallel build. So
>
> BR2_DEBUG_WRAPPER=1 make V=1 BR2_JLEVEL=1

Running this make on (uncleaned) Build Station 1, I got the same error
as before. No difference in output other than a bit more logs.

>
> [snip]
> >>  - Your Buildroot .config file
>
>  To make it smaller, you can run 'make savedefconfig' and include that in the mail.
>
>  But anyway, the interesting bit is
>
> BR2_RELRO_FULL=y
>
> Full relro is currently broken. See the bug report [1] and the patches to fix it
> [2].

Thanks for the very helpful input. I set BR2_RELRO_PARTIAL=y after
reading the bug report. Building clean on Build Station 1, it managed
to avoid the earlier errors. So that's a win. But at a later stage of
compilation I got a new error [7].

I set BR2_RELRO_NONE=y on Build Station 2. That build is under way.
I'll let you know the results.

Could someone suggest a recommended distro and buildroot version that
I could run without having to face these compilation errors?

Kind regards,
m3hm00d

######################7#7#7#7#7#7#7#7#7#7########################
>>> host-file 5.33 Building
PATH="/home/user/Downloads/buildroot-2018.08-rc3/output/host/bin:/home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/sbin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl"
PKG_CONFIG="/home/user/Downloads/buildroot-2018.08-rc3/output/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/home/user/Downloads/buildroot-2018.08-rc3/output/host/lib/pkgconfig:/home/kenobi/Downloads/buildroot-2018.08-rc3/output/host/share/pkgconfig"
 /usr/bin/make -j9  -C
/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/
make[1]: Entering directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33'
/usr/bin/make  all-recursive
make[2]: Entering directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33'
Making all in src
make[3]: Entering directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/src'
sed -e "s/X.YY/$(echo 5.33 | tr -d .)/" < ../src/magic.h.in > magic.h
/usr/bin/make  all-am
make[4]: Entering directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/src'
  CC       buffer.lo
  CC       apprentice.lo
  CC       magic.lo
  CC       softmagic.lo
  CC       ascmagic.lo
  CC       encoding.lo
  CC       compress.lo
  CC       is_tar.lo
  CC       readelf.lo
  CC       print.lo
  CC       fsmagic.lo
  CC       funcs.lo
  CC       apptype.lo
  CC       der.lo
  CC       cdf.lo
  CC       cdf_time.lo
  CC       readcdf.lo
readelf.c: In function 'donote':
readelf.c:1027:13: warning: 'nh64.n_type' may be used uninitialized in
this function [-Wmaybe-uninitialized]
  Elf64_Nhdr nh64;
             ^~~~
readelf.c:1026:13: warning: 'nh32.n_type' may be used uninitialized in
this function [-Wmaybe-uninitialized]
  Elf32_Nhdr nh32;
             ^~~~
  CC       strlcpy.lo
  CC       strlcat.lo
  CC       fmtcheck.lo
  CC       file.o
  CC       seccomp.o
  CCLD     libmagic.la
  CCLD     file
make[4]: Leaving directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/src'
make[3]: Leaving directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/src'
Making all in magic
make[3]: Entering directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/magic'
../src/file -C -m magic
make[3]: *** [Makefile:764: magic.mgc] Bad system call
make[3]: Leaving directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/magic'
make[2]: *** [Makefile:360: all-recursive] Error 1
make[2]: Leaving directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33'
make[1]: *** [Makefile:291: all] Error 2
make[1]: Leaving directory
'/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33'
make: *** [package/pkg-generic.mk:232:
/home/user/Downloads/buildroot-2018.08-rc3/output/build/host-file-5.33/.stamp_built]
Error 2
######################7#7#7#7#7#7#7#7#7#7########################

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

* [Buildroot] Fwd: Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf
  2018-09-05  6:19           ` Vadim Kochan
@ 2018-09-05 12:24             ` Faisal Mehmood
  2018-09-05  8:42               ` Baruch Siach
  0 siblings, 1 reply; 8+ messages in thread
From: Faisal Mehmood @ 2018-09-05 12:24 UTC (permalink / raw)
  To: buildroot

On Wed, Sep 5, 2018 at 6:13 AM Vadim Kochan <vadim4j@gmail.com> wrote:
>
> Hi Faisal!
>
> On Wed, Sep 5, 2018 at 8:53 AM Faisal Mehmood <f.m3hm00d@gmail.com> wrote:
> >
> > On Tue, Sep 4, 2018 at 8:18 PM Arnout Vandecappelle <arnout@mind.be> wrote:
> > >
> > >
> > >  As Thomas mentioned, for some reason you don't seem to be able to build a
> > > shared library.
> > >
> > >  To debug this, could you re-run (without cleaning) with BR2_DEBUG_WRAPPER=1 in
> > > the environment? And also make it verbose, with V=1. And disable parallel build. So
> > >
> > > BR2_DEBUG_WRAPPER=1 make V=1 BR2_JLEVEL=1
> >
> > Running this make on (uncleaned) Build Station 1, I got the same error
> > as before. No difference in output other than a bit more logs.
> >
> > >
> > > [snip]
> > > >>  - Your Buildroot .config file
> > >
> > >  To make it smaller, you can run 'make savedefconfig' and include that in the mail.
> > >
> > >  But anyway, the interesting bit is
> > >
> > > BR2_RELRO_FULL=y
> > >
> > > Full relro is currently broken. See the bug report [1] and the patches to fix it
> > > [2].
> >
> > Thanks for the very helpful input. I set BR2_RELRO_PARTIAL=y after
> > reading the bug report. Building clean on Build Station 1, it managed
> > to avoid the earlier errors. So that's a win. But at a later stage of
> > compilation I got a new error [7].
> >
> > I set BR2_RELRO_NONE=y on Build Station 2. That build is under way.
> > I'll let you know the results.
> >
> > Could someone suggest a recommended distro and buildroot version that
> > I could run without having to face these compilation errors?
> >
>
> Could you provide config generated by 'make savedefconfig' ? So I can try it out
> to check on my environment.
>
As stupid as it sounds, I am not able to find out where 'make
savedefconfig' saves the defconfig file.

Anyway, the Build Station 2 (running Debian 9.5 on VM) managed to
complete compilation. The issues were:

1- Arch Linux uses glibc2.28. BR2018.02.5 doesn't play nice with
glib2.28. Switching to Debian 9.5 (glibc2.24) solved it
2- BR2_RELRO_FULL is not yet supported (thanks to Arnout for pointing
it out). Needed to apply patch to fix it. So I just set
BR2_RELRO_NONE=1 to avoid it altogether
3- After these changes, Debian 9.5 compiled 2018.02.5 successfully.
Arch is still throwing weird errors [7] with BR2018.08-rc3. I guess
i'll stick to Debian+BR2018.02.5 for now.

Thanks guys for your help.

Regards,
m3hm00d

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

end of thread, other threads:[~2018-09-05 12:24 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-04 11:24 [Buildroot] Beginner help: Compilation errors for bison, ncurses and arm-buildroot-linux-uclibcgnueabihf Faisal Mehmood
2018-09-04  8:20 ` Thomas Petazzoni
     [not found]   ` <CAL8qisnsRCYbC5+x8GAT+wZ_qiB=6EGBUVkK=GRk0JHy-T4ifA@mail.gmail.com>
2018-09-04 15:32     ` [Buildroot] Fwd: " Faisal Mehmood
2018-09-04 20:17       ` Arnout Vandecappelle
2018-09-05 10:51         ` Faisal Mehmood
2018-09-05  6:19           ` Vadim Kochan
2018-09-05 12:24             ` Faisal Mehmood
2018-09-05  8:42               ` Baruch Siach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.