I find problems when I started to compile openjdk for my first time.
Below is what I did
hg clone http://hg.openjdk.java.net/jdk9/dev 9dev
cd 9dev
bash ./get_source.sh
bash ./configure
Then, I got this error message
configure: error: Could not find X11 libraries. You might be able to fix this by running 'sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel'.
Then, I did what it told me to do.
After the installation, the same error still exists.
So I checked where the files lies on my machine
rpm -qa | grep X11
libX11-1.6.3-3.el7.x86_64
libX11-common-1.6.3-3.el7.noarch
libX11-devel-1.6.3-3.el7.x86_64
rpm -ql libX11-1.6.3-3.el7.x86_64
/usr/lib64/libX11-xcb.so.1
/usr/lib64/libX11-xcb.so.1.0.0
/usr/lib64/libX11.so.6
/usr/lib64/libX11.so.6.3.0
so i tried the way of specifying the X11 path
bash ./configure --x-libraries=/usr/lib64
Unfortunately, the same error still stays.
Can someone help me out of here, please?
thx
update
Thank #omajid for directing me to the log file config.log, where I found that the configure is using the gcc in my linuxbrew installation.
configure:56234: /data/alex/git/brew/bin/g++ -o conftest conftest.cpp -lX11 >&5
/data/alex/git/brew/bin/ld: cannot find -lX11
collect2: error: ld returned 1 exit status
configure:56234: $? = 1
So after I exported my c compiler to the system one, the problem was fixed.
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
Here is the relevant packages needed at build time and the configure flags I use in my spec file for building unofficial OpenJDK 9 packages for Fedora/EPEL:
autoconf
automake
alsa-lib-devel
binutils
cups-devel
desktop-file-utils
fontconfig
freetype-devel
elfutils
giflib-devel
gcc-c++
gdb
gtk2-devel
lcms2-devel
libjpeg-devel
libpng-devel
libxslt
libX11-devel
libXi-devel
libXinerama-devel
libXt-devel
libXtst-devel
nss-devel
pkgconfig
xorg-x11-proto-devel
zip
java-1.8.0-openjdk-devel
bash ../configure \
--with-boot-jdk=/usr/lib/jvm/java-1.8.0-openjdk/ \
--with-native-debug-symbols=internal \
--enable-unlimited-crypto \
--with-zlib=system \
--with-libjpeg=system \
--with-giflib=system \
--with-libpng=system \
--with-lcms=system \
--with-stdc++lib=dynamic \
--disable-javac-server \
--disable-warnings-as-errors
In any case, the error messages produce by configure are a best guess. You should take a look at config.log to see what test actually failed and what the error messages are. In this case, it looks like you are probably missing one of several X11 libraries. Possibly libXinerama-devel.
If this still doesn't fix your error, please paste the error messages from your autoconf log file (should be named config.log or configure.log, I forget).
Related
I am trying to start using TPM on Linux, on my Raspberry Pi to be accurate, and the easiest would be to use swtpm to get used to commands and system, before using a TPM chip. I've tried the way presented on https://github.com/stefanberger/swtpm/wiki#compile-on-ubuntu-2104, but I got the error "Unable to locate libtpms-dev".
Then I looked for a way to install libtpms, and found this one solution. But after getting those both, I still couldn't run this command :
sudo swtpm socket --tpmstate dir=/home/ludovic.peyter/swtpm --tpm2 --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --flags not-need-init,startup-clear
All I get is the following error :
swtpm: SWTPM_NVRAM_Lock_Dir: Could not open lockfile: No such file or directory
and
swtpm: Error: Could not initialize libtpms.
And here am I stuck, finding nothing to help me with this problem, or even an other way to avoid it.
Thanks for reading.
I have a complete solution, built with many different solutions and my own tests.
sudo apt -y install dpkg-dev debhelper libssl-dev libtool net-tools libfuse-dev libglib2.0-dev libgmp-dev expect libtasn1-dev socat python3-twisted gnutls-dev gnutls-bin libjson-glib-dev gawk git python3-setuptools softhsm2 libseccomp-dev automake autoconf libtool gcc build-essential libssl-dev dh-exec pkg-config dh-autoreconf libtool-bin tpm2-tools libtss0 libtss2-dev
Then make a new directory for more comfort, and step into it.
Clone git repository for libtpms :
git clone https://github.com/stefanberger/libtpms.git
Move to the generated libtpms directory and run these commands :
./autogen.sh -–with-openssl
make dist
dpkg-buildpackage -us -uc -j4
Then, as asked at the end of the last running command, run :
libtool --finish /usr/lib/aarch64-linux-gnu/
The directory could be different, so pay attention to the warning at the end of dpkg command.
And to finish the installation of libtpms :
sudo apt install ../libtpms*.deb
Now get back to the previous directory and clone swtpm git repository :
git clone https://github.com/stefanberger/swtpm.git
Now run this command :
dpkg-buildpackage -us -uc -j4
And the command asked by the previous running command :
libtool --finish /usr/lib/aarch64-linux-gnu/swtpm
The directory could be different, so pay attention to the warning at the end of dpkg command.
Now finish the installation with this :
sudo apt install ../swtpm*.deb
Everithing you need is installed. Now you need to modify the file ~/.profile or ~/.bash_profile to add this line :
export TPM2TOOLS_TCTI="swtpm:port=2321"
And now, everytime you need your swtpm, open two terminals, and in one of them run :
swtpm socket --tpmstate dir=<swtpm_path> --tpm2 --server type=tcp,port=2321 --ctrl type=tcp,port=2322 --flags not-need-init,startup-clear
In the other terminal, as long as the above command runs, you can run all your TPM commands.
Have you checked that the tpmstate directory exists? A mkdir /home/ludovic.peyter/swtpm2 could fix it for you.
I'm new to yocto, my goal is to add a printer driver to the yocto image of imx6 so that we can access the priter from the board. i was trying a build, following the instructions at IMXLXYOCTOUG.PDF.
$ DISTRO=fsl-imx-xwayland MACHINE=imx6qsabresd source fsl-setup-release.sh -b build_dir
$ source setup-environment build_dir
$ bitbake fsl-image-qt5-validation-imx
the basic build was successful, i brought up the board with gui, things were fine.
i wanted to add printer support to the image, so ive added meta-printing (https://github.com/rossburton/meta-printing) layer. i've updated bblayer.conf
BBFILES ?= ""
BBLAYERS = " \
${BSPDIR}/sources/poky/meta \
${BSPDIR}/sources/poky/meta-poky \
\
${BSPDIR}/sources/meta-openembedded/meta-oe \
${BSPDIR}/sources/meta-openembedded/meta-multimedia \
\
${BSPDIR}/sources/meta-freescale \
${BSPDIR}/sources/meta-freescale-3rdparty \
${BSPDIR}/sources/meta-freescale-distro \
**${BSPDIR}/sources/meta-printing \**
as per the instruction in README from github.
Later after booting i was not able to access lp command to print some sample file with the printer. so i added
IMAGE_INSTALL_append = " cups"
in local.conf file which is giving me this error below..
| checking for posix_spawn... yes
| checking for tm_gmtoff member in tm structure... yes
| checking for st_gen member in stat structure... no
| checking for removefile... no
| configure: error: Need pkg-config to enable libusb support.
| NOTE: The following config.log files may provide further information.
| NOTE: /home/jifri/on_board/yocto/imx-yocto-bsp/build_dir/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/cups/2.1.4-r0/cups-2.1.4/config.log
| ERROR: configure failed
| WARNING: exit code 1 from a shell command.
| ERROR: Function failed: do_configure (log file is located at /home/jifri/on_board/yocto/imx-yocto-bsp/build_dir/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/cups/2.1.4-r0/temp/log.do_configure.8342)
ERROR: Task (/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-printing/recipes-printing/cups/cups_2.1.4.bb:do_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 5414 tasks of which 5399 didn't need to be rerun and 2 failed.
Summary: 2 tasks failed:
/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-epson/recipes-epson/bbepson/bbepson_0.1.bb:do_compile
/home/jifri/on_board/yocto/imx-yocto-bsp/sources/meta-printing/recipes-printing/cups/cups_2.1.4.bb:do_configure
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.
i have the pkg-config installed on my host PC
$ pkg-config --version
0.29.1
$ sudo apt-get install libusb-0.1-4
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-0.1-4 is already the newest version (2:0.1.12-28).
The following packages were automatically installed and are no longer required:
snap-confine snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
$ sudo apt-get install libusb-1.0-0-dev
[sudo] password for eldaas:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libusb-1.0-0-dev is already the newest version (2:1.0.20-1).
The following packages were automatically installed and are no longer required:
snap-confine snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 45 not upgraded.
Any idea why
configure: error: Need pkg-config to enable libusb support.
is happening.
or
is it the right way / is there any better methord to get the lp command running on imx6 through yocto. so that i can access the printer..
any input is apretiated..
Thank you.
I've solved the same. actually I've added meta-printing layer to get the access to cups. but cups were already existing along with the meta layer in poky (imx-yocto-bsp/sources/poky/meta/recipes-extended/cups). so I removed meta-printing layer & then updated build/conf/local.conf with
IMAGE_INSTALL_append = " cups"
This worked for me and after booting I was able to use lp, lpadmin etc.. commands on my imx6 board.
I'm trying connect to PostgreSQL from C-code, and i have to build libpq from source, because i'm on AIX. I followed the steps in this comment
Where do i get libpq source?
but in result i got a 32-bit version of libpq.a, how build 64-bit version?
Compiling on AIX is harder than on other platforms...
Always create a script which you gradually improve till you get a working version. Possible start:
#!/bin/sh
#assuming gcc
GCCLIB=$(dirname $(gcc -maix64 -pthread -print-file-name=libgcc_s.a))
export CFLAGS='-maix64 -mtune=native -pthread'
export CPPFLAGS='-D_GNU_SOURCE -D_XOPEN_SOURCE=500 -D_ALL_SOURCE'
export LDFLAGS="-maix64 -Wl,-brtl -Wl,-blibpath:/usr/local/lib64:${GCCLIB}:/usr/lib -L/usr/local/lib64 -pthread"
export OBJECT_MODE=64
./configure --prefix=/usr/local \
--libdir=/usr/local/lib64 \
--enable-shared \
--enable-static \
2>&1 | tee log.configure
make all 2>&1 | tee log.make.all
make install 2>&1 | tee log.make.install
The -q64 compiler option enables 64 bit (there is info in the compiler docs)
A quick google search of xlC 64 bit gives this link which you might find helpful.
http://northstar-www.dartmouth.edu/doc/ibmcxx/en_US/doc/complink/tasks/tubld64a.htm
I have installed MPI and GCC seperatly using yum commands,
And now when I use following command:
mpic++ first.c -o first
it says:
bash: mpic++: command not found
Can somebody please help me? I will be very thankful.
Background: I am using centos 6.5, and i am new on linux, however I have good understanding of terminal.
Mpi environment is controlled by module in CentOS so you first have to load the mpi/openmpi-x86_64 module:
module load mpi/openmpi-x86_64
In my case (Centos 7.5) the module command was not available, so I just needed to add the MPI executables to my path.
I found their location by looking at the output of this command:
rpmquery -l openmpi-devel | grep cc
And then added the following to my path:
export PATH=$PATH:/usr/lib64/openmpi/bin/
See it: https://courses.cs.washington.edu/courses/csep524/13wi/mpi/mpi_setup.txt
I also install mpi from yum, but it can't help me. I use:
download mpich
cd
wget http://www.mpich.org/static/tarballs/3.0.2/mpich-3.0.2.tar.gz
tar xzf mpich-3.0.2.tar.gz
build mpich and install in home (can also see mpich-3.0.2/README)
cd mpich-3.0.2
./configure --prefix=$HOME/mpich-install 2>&1 | tee c.txt
make 2>&1 | tee m.txt
make install 2>&1 | tee mi.txt
put mpi binaries (e.g. mpicc, mpirun) on your PATH
add the following line to your ~/.bashrc:
export PATH=$PATH:~/mpich-install/bin
source ~/.bashrc
compile hello world:
mpicc helloworld.c -o helloworld
I get: cc: error: helloworld.c: No such file or director
Okay, so I was trying to install a combination of the CGI module, DBI module, and DBD::Oracle driver using CPANM on a 64bit Solaris 11 machine with an Oracle11g database.
I installed that latest version of Perl using Perlbrew, updated CPANM, and then did the following...
cpanm -v -f -i CGI
cpanm -v -f -i DBI
And both of those modules installed fine, the DBI did have a small test error (t/zvxnp_85gofer.t) when I tried to install it normally, but the force install seemed to work.
So then I went to try to install the final part that I needed:
cpanm -v -f -i DBD::Oracle
And this was the error that came out towards the end of the installation...
Running Mkbootstrap for DBD::Oracle ()
chmod 644 Oracle.bs
rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/rdbms/lib" gcc -G -L/usr/gnu/lib -fstack-protector Oracle.o dbdimp.o oci8.o -o blib/arch/auto/DBD/Oracle/Oracle.so \
-L/opt/oracle/rdbms/lib/ -lclntsh -lkstat -lnsl -lsocket -lresolv -lgen -ldl -lsched -lrt -R/opt/oracle/rdbms/lib -laio -lposix4 -lkstat -lm -lpthread \
ld: fatal: file /opt/oracle/rdbms/lib//libclntsh.so: wrong ELF class: ELFCLASS64
ld: fatal: file processing errors. No output written to blib/arch/auto/DBD/Oracle/Oracle.so
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `blib/arch/auto/DBD/Oracle/Oracle.so'
FAIL
! Installing DBD::Oracle failed. See /home/oracle/.cpanm/build.log for details.
I'm guessing just from the wrong ELF class: ELFCLASS64 it has to do with some mismatch between the 64 bit binaries that exist and that this driver requires the 32 bit binaries to install? Some research has indicated that I need to find the lib32 directory to continue the installation, but I can't seem to find it.
I did:
echo $ORACLE_HOME ---> /opt/oracle/rdbms
ls $ORACLE_HOME
That returned the following directories...
apex emcli mgw rdbms
assistants has network relnotes
bin hs nls root.sh
ccr ide oc4j scheduler
cdata install odbc slax
cfgtoollogs install.platform olap sqldeveloper
clone instantclient ons sqlj
config inventory OPatch sqlplus
crs j2ee opmn srvm
csmig javavm oracore sysman
css jdbc oraInst.loc timingframework
ctx jdev ord ucp
cv jdk oui uix
dbs jlib owb utl
dc_ocm ldap owm wwg
deinstall lib64 perl xdk
demo log plsql
diagnostics md precomp
dv mesg racg
So I see a lib64, but no lib or lib32. Has anyone ever had this problem before, found a solution to it, or know how I could continue from here?
I had the same issue. Fixed it by doing ./Configure -es -Dprefix=$HOME/usr/local -Dcc=gcc -Duse64bitall -Dusethreads for perl install
please take a look at 1271236.1 and 883702.1 at oracle.com. It will explain how to get the 32bit libraries for 11i client installation.