Severity
blocker == prevents use of system, no work-around
critical == prevents use of function , no workaround
major == prevents use, work-around exists
normal == does not prevent use, but remains difficult to use, no work-around
minor == does not prevent use but has side effect
trivial == an annoyance, but does not affect use or performance, like a bad comment in code.
Priority (we only use 4) P1 == prevent release P2 == will fix, but does not prevent release P3 == will not fix P5 == unassigned
Bug 337 - Package installation needed.
: Package installation needed.
Status: RESOLVED FIXED
: Marc Administration Needed
Package installation needed
: marc019
: PC Other
: P2 major
Assigned To:
:
:
:
  Show dependency treegraph
 
Reported: 2011-10-25 07:08 by
Modified: 2011-12-16 01:27 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2011-10-25 07:08:44
Hello,

Can you install the following packages in marc019:
bison flex texinfo libncurses5-dev libncursesw5-dev intltool gpm libXt-dev

Thank you,
Papagiannis Anastasios
------- Comment #1 From 2011-10-25 09:26:04 -------
Installed needed packages and relinked sh to bash
root@marc019:/bin# apt-get install bison flex texinfo libncurses5-dev
libncursesw5-dev intltool gpm libXt-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
bison is already the newest version.
flex is already the newest version.
texinfo is already the newest version.
libncurses5-dev is already the newest version.
libncursesw5-dev is already the newest version.
intltool is already the newest version.
gpm is already the newest version.
libxt-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 33 not upgraded.
root@marc019:/bin#

root@marc019:/bin# ls -l sh
lrwxrwxrwx 1 root root 9 2011-10-25 09:19 sh -> /bin/bash
root@marc019:/bin#
------- Comment #2 From 2011-10-25 09:57:05 -------
Seems that a ncurses lib is missing. Here is a part of the output from make:

-------------------------------------------
mkdir -p
/shared/apapag/sccLinux/buildroot-2011.05/output/host/usr/i586-unknown-linux-gnu/sysroot/usr/share/aclocal
Checking for 'grep'... /bin/grep
Checking whether '/bin/grep' supports -E... yes
Checking for 'sed'... /bin/sed
Checking whether '/bin/sed' supports -i and -e... yes
Checking for 'bash'... /bin/bash
Checking for 'cut'... /usr/bin/cut
Checking for 'install'... /usr/bin/install
Checking for 'make'... /usr/bin/make
Checking for 'gcc'... /opt/i386-unknown-linux-gnu/bin/gcc
Checking for 'awk'... /usr/bin/awk
Checking for 'bison'... /usr/bin/bison
Checking for 'flex'... /usr/bin/flex
Checking for 'makeinfo'... /usr/bin/makeinfo
Checking for 'automake'...
/shared/apapag/sccLinux/buildroot-2011.05/output/host/usr/bin/automake
Checking for 'libtool'...
/shared/apapag/sccLinux/buildroot-2011.05/output/host/usr/bin/libtool
Checking for 'stat'... /usr/bin/stat
Checking for 'curl'... /usr/bin/curl
Checking for 'patch'... /usr/bin/patch
Checking for 'tar'... /bin/tar
Checking for 'gzip'... /bin/gzip
Checking for 'bzip2'... /bin/bzip2
Checking for 'lzma'... /usr/bin/lzma
Checking for 'readlink'... /bin/readlink
Checking for 'objcopy'... /opt/i386-unknown-linux-gnu/bin/objcopy
Checking for 'objdump'... /opt/i386-unknown-linux-gnu/bin/objdump
Checking for 'readelf'... /opt/i386-unknown-linux-gnu/bin/readelf
Checking for 'patch'... /usr/bin/patch
Checking for 'ncurses/ncurses.h'... no
Checking for 'ncurses/curses.h'... no
Checking for 'ncurses.h'... no
Checking for 'curses.h'... no

ncurses headers files were not found

Either you are missing entirely the needed tool,
or the version you have is too old.

configure: Bailing out...
make: ***
[/shared/apapag/sccLinux/buildroot-2011.05/output/build/crosstool-ng-1.11.3/.configured]
Error 1
------------------------------------

I am trying to make the linux kernel. Also make menuconfig cannot work because
is asks for a ncurses lib. Here is the output:
------------------------------------
apapag@marc019:/shared/apapag/sccLinux/buildroot-2011.05$ make menuconfig
mkdir -p
/shared/apapag/sccLinux/buildroot-2011.05/output/build/buildroot-config/lxdialog
make CC="/opt/i386-unknown-linux-gnu/bin/gcc"
HOSTCC="/opt/i386-unknown-linux-gnu/bin/gcc"
obj=/shared/apapag/sccLinux/buildroot-2011.05/output/build/buildroot-config -C
package/config -f Makefile.br mconf
make[1]: Entering directory
`/shared/apapag/sccLinux/buildroot-2011.05/package/config'
 *** Unable to find the ncurses libraries or the
 *** required header files.
 *** 'make menuconfig' requires the ncurses libraries.
 ***
 *** Install ncurses (ncurses-devel) and try again.
 ***
make[1]: ***
[/shared/apapag/sccLinux/buildroot-2011.05/output/build/buildroot-config/dochecklxdialog]
Error 1
make[1]: Leaving directory
`/shared/apapag/sccLinux/buildroot-2011.05/package/config'
make: ***
[/shared/apapag/sccLinux/buildroot-2011.05/output/build/buildroot-config/mconf]
Error 2
------------------------------------
------- Comment #3 From 2011-10-25 10:01:36 -------
Strange .. ncurses is there. Let me try a build myself.
How soon after you started make did that error message appear?
------- Comment #4 From 2011-10-25 10:07:20 -------
Not more than 10 minutes I think. The directory is /shared/apapag/sccLinux/.
The only change that I made is that I use commandline.bin.popshm instead
commandline.bin.
------- Comment #5 From 2011-10-25 11:37:33 -------
Have you tried using POP-SHM with the standard SCC LINUX? I understand that you
may want to change the initial boot values, but I wanted to mention the
following (which is a change from the way it used to be).

Prior to sccKit 1.4.1, POP-SHM was not enabled by default and our docs said to
modify commandline.bin, and that's what you did. Did you edit the existing
commandline.bin or use one from the older Linux? I've been using bvi (binary
vi) to edit binary files.

You can see that POP-SHM is enabled by default by ssh'ing to a core and then
issuing a cat /proc/meminfo as follows ... 

rck00:popshm # cat /proc/meminfo |grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB
POPSHM buffer size:  16384 kB
POPSHM base address: 0x22000000
rck00:popshm #

Have you tried running the POP-SHM test? The POP-SHM test file is available on
our public SVN. I can run it under the newest SCC Linux as follows...

tekubasx@marc101:/shared/tekubasx/install/popshm$ ssh root@rck00
rck00:/root # cd /shared/tekubasx/install/popshm
rck00:popshm # ./test
Testing POPSHM routines...

Initializing...Done!


Starting popshm_but/get tests...

POPSHMCODE_ADDRESS_OUT_OF_BOUNDS true: PASSED
POPSHMCODE_ADDRESS_OUT_OF_BOUNDS false: PASSED
POPSHMCODE_INVALID_TYPE true: PASSED
POPSHMCODE_INVALID_TYPE false: PASSED
CHAR always aligned: PASSED
SHORT INT aligned true: PASSED
SHORT INT aligned false: PASSED
UNSIGNED SHORT INT aligned true: PASSED
UNSIGNED SHORT INT aligned false: PASSED
INT aligned true: PASSED
INT aligned false: PASSED
LONG INT aligned true: PASSED
LONG INT aligned false: PASSED
UNSIGNED LONG INT aligned true: PASSED
UNSIGNED LONG INT aligned false: PASSED
FLOAT aligned true: PASSED
FLOAT aligned false: PASSED
DOUBLE aligned true: PASSED
DLUBLE aligned false: PASSED
DOUBLE aligned true: PASSED
DLUBLE put/get aligned false: PASSED

Done with popshm_but/get tests.

Starting popshm_memcpy tests...

Testing memcpy put and get: PASSED

Dont with popshm_memcpy tests.

Finalizing...Done!
rck00:popshm #

There have been some issues building the new SCC Linux, and I've been looking
at those today. It seems to take longer on a data center system (or maybe the
network is just lazy today) but I have a build on another system that's been
going on for a few hours so far. When it finishes, I'll see what a change to
commandline.bin does.
------- Comment #6 From 2011-10-25 11:37:51 -------
+Isaias
------- Comment #7 From 2011-10-25 11:59:10 -------
I used this test with a previous kernel version and works fine. Today I begin
again an older project and I have some issues. First of all I used the kernel
linux_912_rckmem_006-38.obj from trunk. After boot I issue 'echo 16 >
/proc/sys/vm/nr_hugepages' and then 'cat /proc/meminfo | grep POPSHM' and the
result is:

POPSHM pages:        4
POPSHM page size:    16384 kB
POPSHM buffer size:  65536 kB
POPSHM base address: 0x00000000

But the correct instruction to do this must be 'echo 4 > ... '. With 'echo 4 >
...' gives me 1 popshm pages.  Then I tried the test and in many cases the test
fails. The result is:
-----------------------------------
rck00:popshm-20110126 # ls
main.c     main.o     makefile   popshm.c   popshm.h   popshm.o   run.sh*   
scc_api.c  scc_api.h  scc_api.o  test*
rck00:popshm-20110126 # ./test
Testing POPSHM routines...

Initializing...Done!


Starting popshm_but/get tests...

POPSHMCODE_ADDRESS_OUT_OF_BOUNDS true: PASSED
POPSHMCODE_ADDRESS_OUT_OF_BOUNDS false: FAILED
POPSHMCODE_INVALID_TYPE true: PASSED
POPSHMCODE_INVALID_TYPE false: FAILED
CHAR always aligned: FAILED
SHORT INT aligned true: FAILED
SHORT INT aligned false: PASSED
UNSIGNED SHORT INT aligned true: FAILED
UNSIGNED SHORT INT aligned false: PASSED
INT aligned true: FAILED
INT aligned false: PASSED
LONG INT aligned true: FAILED
LONG INT aligned false: PASSED
UNSIGNED LONG INT aligned true: FAILED
UNSIGNED LONG INT aligned false: PASSED
FLOAT aligned true: FAILED
FLOAT aligned false: PASSED
DOUBLE aligned true: FAILED
DLUBLE aligned false: PASSED
DOUBLE aligned true: FAILED
DLUBLE put/get aligned false: PASSED

Done with popshm_but/get tests.

Starting popshm_memcpy tests...

Testing memcpy put and get: Segmentation fault
-----------------------------------------------------

I tried and another test program writen from me but it gives me segmentation
fault. The only reason that I want to build a new kernel is to have POPSHM
pages without the need to give 'echo 4 > /proc/sys/vm/nr_hugepages'. Also I
don't want  to use POPSHM but just the memory that POPSHM kernel allocates for
that. In this case 4*16MB of contiguous physical memory.
------- Comment #8 From 2011-10-25 13:34:23 -------
+Michael 
+Jan

Michael, Jan, or Isaias ... can you help us understand the relationship between
the POPSHM buffer size and the POPSHM number of pages. I don't see the seg
fault that Papagiannis sees when he runs the POPSHM test program.

I also loaded the linux_912_rckmem_006-38.obj. I honestly don't remember
whether this is the version with the latest/greatest L2 flush routine, and I'll
check that. Or build another that I know has the correct routine and post it.

After booting, I see
rck00:/root # uname -a
Linux rck00 2.6.38.3-jbrummer #4 PREEMPT Mon Sep 12 14:59:47 PDT 2011 i586
GNU/Linux
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB

I do see the same result that you do with the echo as in the following. I echo
4*(the number of POPSHM pages). 

After I do the echo 4 to /proc/sys/vm/nr_hugepages, I can run test without
error. I don't see the seg fault you do. But your base address is different
from mine, however.

Isaias, is this what you intended? The docs we have say that one can alter the
number of POPSHM pages by doing an echo to /proc/sys/vm/nr_hugepages and the
implication is that you echo the number of POPSHM pages. It does look as if one
must echo 4 times the number of pages you want.

It seems that what we are really echoing is the POPSHM buffer size where 1 is
4096 KB. And if the number is less than 4, we get 0 POPSHM pages because a
POPSHM page is 16M.

rck00:/root # echo 1 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        0
POPSHM page size:    16384 kB
POPSHM buffer size:   4096 kB <== 1* 4K
POPSHM base address: 0x22000000

rck00:/root # echo 2 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        0
POPSHM page size:    16384 kB
POPSHM buffer size:   8192 kB <== 2 * 4K
POPSHM base address: 0x22000000

rck00:/root # echo 5 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB
POPSHM buffer size:  20480 kB <== 5 * 4K
POPSHM base address: 0x22000000
rck00:/root #

rck00:/root # echo 4 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB
POPSHM buffer size:  16384 kB
POPSHM base address: 0x22000000

rck00:/root # echo 8 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        2
POPSHM page size:    16384 kB
POPSHM buffer size:  32768 kB
POPSHM base address: 0x22000000

rck00:/root # echo 12 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        3
POPSHM page size:    16384 kB
POPSHM buffer size:  49152 kB
POPSHM base address: 0x22000000

rck00:/root # echo 16 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        4
POPSHM page size:    16384 kB
POPSHM buffer size:  65536 kB
POPSHM base address: 0x22000000
rck00:/root #

Isaias, what does it mean for the user to set the POPSHM buffer larger than the
number of POPSHM pages?
------- Comment #9 From 2011-10-25 13:59:44 -------
Another difference from you is that when I boot linux_912_rckmem_006-38.obj the
POPSHM is disabled.
------------------------------
apapag@marc019:/shared/apapag/object$ sccBoot -l
/shared/apapag/object/linux_912_rckmem_006-38.obj 0..47
INFO: Welcome to sccBoot 1.4.1 (build date Jul  4 2011 - 16:14:13)...
INFO: Starting to boot Linux: All cores!
INFO: Over-all private memory:    640 MB per Core
INFO: Video buffer size:        -   2 MB per Core
INFO: POP-SHM buffer size:      -   0 MB per Core (disabled) <------- HERE
INFO: Usable private memory:    = 638 MB per Core
INFO: Video resolution is 640x480 @16 bit...
INFO: Using linux image "/shared/apapag/object/linux_912_rckmem_006-38.obj"
(provided by user)...
INFO: Creating .mt file "/tmp/sccKit_apapag/linux.mt"...
INFO: Nothing to copy as /shared/apapag/object/linux_912_rckmem_006-38.obj and
/tmp/sccKit_apapag/linux.obj don't differ...
INFO: Merging objects with sccMerge:
INFO: -> sccMerge -broadcast -m 8 -n 12 -noimage linux.mt
INFO: Merging command-line patches...
INFO: Pulling resets and enabling L2 caches: All cores!
INFO: Preloading Memory with object file...
Loading content of file "/tmp/sccKit_apapag/obj/mch_0_0.32.obj" to DestID PERIW
of Tile 0x0 (RC port)...
INFO: writeMemFromOBJ(...): Configuration of memory done!
INFO: Patching kernel command-line...
INFO: writeMemFromOBJ(...): Configuration of memory done!
INFO: Preloading LUTs...
INFO: Configuring LUTs with content of file
"/tmp/sccKit_apapag/obj/lut_init.dat"...
Configuring LUTs with content of file "/tmp/sccKit_apapag/obj/lut_init.dat"...
INFO: -> Configuration of LUTs done!
INFO: (Re-)configuring GRB registers...
INFO: Releasing resets...
INFO: Linux has been started successfully. Cores should be reachable via TCP/IP
shortly...
----------------
and after boot:
----------------
apapag@marc019:/shared/apapag/object$ ssh root@rck00
rck00:/root # cat /proc/meminfo | grep POP
POPSHM pages:        0
POPSHM page size:    16384 kB
POPSHM buffer size:      0 kB
POPSHM base address: 0x00000000
rck00:/root #
----------------
So in this case I have to set manually the number of POPSHM pages:
----------------
rck00:/root # echo 4 > /proc/sys/vm/nr_hugepages
rck00:/root # cat /proc/meminfo | grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB
POPSHM buffer size:  16384 kB
POPSHM base address: 0x00000000
----------------
------- Comment #10 From 2011-10-25 15:27:59 -------
Hmm ... there really should be no difference between our systems. I'll take a
look at your marc019. Augie, do you know of any reason why marc019 might not be
operating properly.

tekubasx@marc101:~/sandbox/CustomSCCLinux$ sccBoot -l
linux_912_rckmem_006-38.obj <=== yes, the new linux
INFO: Welcome to sccBoot 1.4.1 (build date Jul  4 2011 - 16:14:13)...
INFO: Starting to boot Linux: All cores!
INFO: Over-all private memory:    640 MB per Core
INFO: Video buffer size:        -   2 MB per Core
INFO: POP-SHM buffer size:      -  16 MB per Core
INFO: Usable private memory:    = 622 MB per Core
INFO: Video resolution is 640x480 @16 bit...
INFO: Using linux image "./linux_912_rckmem_006-38.obj" (provided by user)...
INFO: Creating .mt file "/tmp/sccKit_tekubasx/linux.mt"...
INFO: Nothing to copy as ./linux_912_rckmem_006-38.obj and
/tmp/sccKit_tekubasx/linux.obj don't differ...
INFO: Merging objects with sccMerge:
INFO: -> sccMerge -broadcast -m 8 -n 12 -noimage linux.mt
INFO: Merging command-line patches...
INFO: Pulling resets and enabling L2 caches: All cores!
INFO: Preloading Memory with object file...
Loading content of file "/tmp/sccKit_tekubasx/obj/mch_0_0.32.obj" to DestID
PERIW of Tile 0x0 (RC port)...
INFO: writeMemFromOBJ(...): Configuration of memory done!
INFO: Patching kernel command-line...
INFO: writeMemFromOBJ(...): Configuration of memory done!
INFO: Preloading LUTs...
INFO: Configuring LUTs with content of file
"/tmp/sccKit_tekubasx/obj/lut_init.dat"...
Configuring LUTs with content of file
"/tmp/sccKit_tekubasx/obj/lut_init.dat"...
INFO: -> Configuration of LUTs done!
INFO: (Re-)configuring GRB registers...
INFO: Releasing resets...
INFO: Linux has been started successfully. Cores should be reachable via TCP/IP
shortly...
tekubasx@marc101:~/sandbox/CustomSCCLinux$ sleep 60
tekubasx@marc101:~/sandbox/CustomSCCLinux$ ssh root@rck00
rck00:/root # cat /proc/meminfo |grep POP
POPSHM pages:        1
POPSHM page size:    16384 kB
POPSHM buffer size:  16384 kB
POPSHM base address: 0x22000000 <== a better base, I think
rck00:/root #
------- Comment #11 From 2011-11-02 08:42:00 -------
Hello Ted,

As Isaias said in <http://communities.intel.com/message/142755> the solution
might be to boot the kernel with sccGui. sccGui has an option to set boot
parameters and specially the number of popshm pages. Changing the number of
pages at runtime not supported in the current version of kernel. But it is not
so easy from our current setup in our lab to use the sccGui. I also read the
source from sccBoot and if I am correct there is no such parameter in command
line tools. I think it's easy to modilfy sccBoot source code to get the desired
result but can I make my custom version of sccBoot without the need to
recompile sccKit? I get the source from
<http://marcbug.scc-dc.com/svn/repository/trunk/sccKit/sccBoot/>. Can you
install for me qmake and any other Qt libraries needed to build sccBoot? (I
don't know exactly which are these Qt libraries are).

Thank you,
Anastasios
------- Comment #12 From 2011-11-06 07:28:42 -------
Hello Ted,

I find a solution in my problem. First of all you can ignore my previous post
about installing Qt libraries in marc019. I managed to get rid of ncurses
problems and compile a kernel for SCC. The problem is that I set PATH in
cross-compile gcc. When I use the last version of gcc that marc019 has
everything works ok. So I modify mm/hugetlb.c where popshm implemented not to
use boot options and in any case to allocate 5 popshm pages at boot. I managed
to boot this kernel correctly and run the popshm test without any errors.

Thank you,
Anastasios
------- Comment #13 From 2011-12-11 17:16:15 -------
I'm sorry for being so late responding to this. 
I'm pleased that you were able to boot a Linux that worked for you.

But your statement below 
"Changing the number of pages at runtime not supported in the current version
of kernel."

concerns me. I thought there was a way to change the number of POPSHM pages
through an API. Am I mistaken on this?

I put this as major because the workaround is to build the kernel that you did,
but it seems overkill to me.
------- Comment #14 From 2011-12-16 01:27:47 -------
Hello Ted,

In http://communities.intel.com/message/142755 (last post) Isaias said that in
the current version of kernel changing the number of POPSHM pages at runtime is
not supported. This can be done by the correct boot options that specify the
number of POPSHM pages. Isaias said that I can specify the number of POPSHM
pages using the sccGui tool but I cannot use Gui tool with our current setup in
our lab. I modify only the default number of POPSHM pages in kernel from 0 to
5.

I don know if there is an API to support this at runtime.