digitalmars.D.learn - How to install dmd2 in centos 5.3 x64
- Puming (14/14) Dec 03 2013 Hi:
- lomereiter (1/1) Dec 03 2013 Did you install binaries or build the compiler from source?
- Puming (3/4) Dec 03 2013 I used the dmd.2.064.2.zip, because when I install the rpm
- Jordi Sayol (6/27) Dec 03 2013 $ rdmd -L-L/usr/lib64 a.d
- Puming (4/33) Dec 03 2013 I was using the default dmd.conf in the .zip package
- Jordi Sayol (4/47) Dec 03 2013 --
- Dejan Lekic (3/17) Dec 03 2013 What architecture that CentOS box is, and give us your
- Puming (14/40) Dec 03 2013 model name : Intel(R) Xeon(R) CPU E5620 @ 2.40GHz
- thr4wa (29/71) Feb 25 2014 same problem:
- FreeSlave (8/8) Feb 25 2014 It's not dmd problem, it's up to ld linker and the issue is same
Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it. Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu. Thanks. Puming.
Dec 03 2013
Did you install binaries or build the compiler from source?
Dec 03 2013
On Tuesday, 3 December 2013 at 11:10:13 UTC, lomereiter wrote:Did you install binaries or build the compiler from source?I used the dmd.2.064.2.zip, because when I install the rpm binary, it says there are dependency issues.
Dec 03 2013
El 03/12/13 11:43, Puming ha escrit:Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it.$ rdmd -L-L/usr/lib64 a.d You can permanently add this to dmd command-line by creating "dmd.conf" file: <http://dlang.org/dmd-linux.html#dmd_conf>Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu.On Debian based systems, like Ubuntu, you can use "d-apt" repository: <http://d-apt.sourceforge.net/>Thanks. Puming.-- Jordi Sayol
Dec 03 2013
On Tuesday, 3 December 2013 at 11:17:27 UTC, Jordi Sayol wrote:El 03/12/13 11:43, Puming ha escrit:still get the same error.Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it.$ rdmd -L-L/usr/lib64 a.dYou can permanently add this to dmd command-line by creatingI was using the default dmd.conf in the .zip package"dmd.conf" file: <http://dlang.org/dmd-linux.html#dmd_conf>Yes, I was using that at home.Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu.On Debian based systems, like Ubuntu, you can use "d-apt" repository: <http://d-apt.sourceforge.net/>Thanks. Puming.
Dec 03 2013
El 03/12/13 14:10, Puming ha escrit:On Tuesday, 3 December 2013 at 11:17:27 UTC, Jordi Sayol wrote:Is "libphobos2.a" the same arch than the program you're building?El 03/12/13 11:43, Puming ha escrit:still get the same error.Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it.$ rdmd -L-L/usr/lib64 a.d-- Jordi SayolYou can permanently add this to dmd command-line by creatingI was using the default dmd.conf in the .zip package"dmd.conf" file: <http://dlang.org/dmd-linux.html#dmd_conf>Yes, I was using that at home.Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu.On Debian based systems, like Ubuntu, you can use "d-apt" repository: <http://d-apt.sourceforge.net/>Thanks. Puming.
Dec 03 2013
On Tuesday, 3 December 2013 at 10:43:06 UTC, Puming wrote:Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it. Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu. Thanks. Puming.What architecture that CentOS box is, and give us your /etc/dmd.conf please.
Dec 03 2013
On Tuesday, 3 December 2013 at 17:47:47 UTC, Dejan Lekic wrote:On Tuesday, 3 December 2013 at 10:43:06 UTC, Puming wrote:model name : Intel(R) Xeon(R) CPU E5620 2.40GHz GNU/Linux I'm using the the dmd.conf in dmd.2.064.2.zip [Environment] #DFLAGS=-I% P%/../../src/phobos -I% P%/../../src/druntime/import -L-L% P%/../lib64 -L-L% P%/../lib32 -L--no-warn-search-mismatch -L--export-dynamic DFLAGS=-I% P%/../../src/phobos -I% P%/../../src/druntime/import -L-L% P%/../lib64 -L-L% P%/../lib32 -L--export-dynamic I commented out the -L--no-warn-search-mismatch because when building there's an error: /usr/bin/ld: unrecognized option '--no-warn-search-mismatch'Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it. Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu. Thanks. Puming.What architecture that CentOS box is, and give us your /etc/dmd.conf please.
Dec 03 2013
same problem: $DMDLOC/dmd2/linux/bin64/dmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a collect2: ld returned 1 exit status --- errorlevel 1 $ cat $DMDLOC/dmd2/linux/bin64/dmd.conf [Environment] DFLAGS=-I% P%/../../src/phobos -I% P%/../../src/druntime/import -L-L% P%/../lib64 -L-L% P%/../lib32 -L--export-dynamic extracted src from dmd.2.064.2.zip and built phobos and dmd from there. fails even on setting LOAD_LIBRARY paths $ export LD_LOAD_LIBRARY=$DMDLOC/dmd2/linux/lib64 $ export LOAD_LIBRARY=$DMDLOC/dmd2/linux/lib64 $ $DMDLOC/dmd2/linux/bin64/dmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a collect2: ld returned 1 exit status --- errorlevel 1 $ ls $DMDLOC/dmd2/linux/lib64 hello.o libphobos2.a libphobos2.so libphobos2.so.0. libphobos2.so.0..0 libphobos2.so.0..o $ lsb_release -a LSB Version: :core-4.0-amd64:core-4.0-ia32:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-ia32:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-ia32:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 5.10 (Final) Release: 5.10 Codename: Final am i doing something silly here? On Wednesday, 4 December 2013 at 01:27:24 UTC, Puming wrote:On Tuesday, 3 December 2013 at 17:47:47 UTC, Dejan Lekic wrote:On Tuesday, 3 December 2013 at 10:43:06 UTC, Puming wrote:model name : Intel(R) Xeon(R) CPU E5620 2.40GHz GNU/Linux I'm using the the dmd.conf in dmd.2.064.2.zip [Environment] #DFLAGS=-I% P%/../../src/phobos -I% P%/../../src/druntime/import -L-L% P%/../lib64 -L-L% P%/../lib32 -L--no-warn-search-mismatch -L--export-dynamic DFLAGS=-I% P%/../../src/phobos -I% P%/../../src/druntime/import -L-L% P%/../lib64 -L-L% P%/../lib32 -L--export-dynamic I commented out the -L--no-warn-search-mismatch because when building there's an error: /usr/bin/ld: unrecognized option '--no-warn-search-mismatch'Hi: I followed the steps in http://dlang.org/dmd-linux.html, but when I build a simple hello world program with: rdmd hello.d I get the following error: rdmd hello.d /usr/bin/ld: cannot find -l:libphobos2.a I have copied dmd2/linux/lib64/libphobos2.a to /usr/lib64, but ld still can't find it. Now I really wish all our servers are using ubuntu server.. Could anybody shed some light on where the problem is? I don't have much experience in linux except using apt-get in ubuntu. Thanks. Puming.What architecture that CentOS box is, and give us your /etc/dmd.conf please.
Feb 25 2014
It's not dmd problem, it's up to ld linker and the issue is same for other compiled languages including C and C++. You should specify LD_LIBRARY_PATH variable in your system before executing any compiled D application. You can add export of this environment variable to your $HOME/.profile or $HOME/.bashrc depending on your system or edit paths in /etc/ld.so.conf.d or /etc/ld.so.conf. The other way is to copy libphobos to path where ld can find it by default, for example, /usr/local/lib.
Feb 25 2014
i already tried LD_LIBRARY_PATH (and alternatives), however, looking deeper it seems like the admin has disabled LD_LIBRARY_PATH on this system (work terminal): http://stackoverflow.com/questions/9843178/linux-capabilities-setcap-seems-to-disable-ld-library-path On Tuesday, 25 February 2014 at 22:37:28 UTC, FreeSlave wrote:It's not dmd problem, it's up to ld linker and the issue is same for other compiled languages including C and C++. You should specify LD_LIBRARY_PATH variable in your system before executing any compiled D application. You can add export of this environment variable to your $HOME/.profile or $HOME/.bashrc depending on your system or edit paths in /etc/ld.so.conf.d or /etc/ld.so.conf. The other way is to copy libphobos to path where ld can find it by default, for example, /usr/local/lib.
Feb 25 2014
On Wednesday, 26 February 2014 at 00:56:53 UTC, thr4wa wrote:i already tried LD_LIBRARY_PATH (and alternatives), however, looking deeper it seems like the admin has disabled LD_LIBRARY_PATH on this system (work terminal): http://stackoverflow.com/questions/9843178/linux-capabilities-setcap-seems-to-disable-ld-library-path On Tuesday, 25 February 2014 at 22:37:28 UTC, FreeSlave wrote:Hello, thr4wa, do you solve your problem, described above? I have same error: /usr/bin/ld: cannot find -l:libphobos2.a What I tried to do: 1) export LD_LIBRARY_PATH=/usr/lib64 2) copy libphobos2.a and libphobos2.so to /usr/lib64 3) soft link to this libraries from /usr/lib 4) added dmd -L-L/usr/lib64 compile flags in the dmd.conf file 5) added /usr/lib64 to the /etc/ld.so.confIt's not dmd problem, it's up to ld linker and the issue is same for other compiled languages including C and C++. You should specify LD_LIBRARY_PATH variable in your system before executing any compiled D application. You can add export of this environment variable to your $HOME/.profile or $HOME/.bashrc depending on your system or edit paths in /etc/ld.so.conf.d or /etc/ld.so.conf. The other way is to copy libphobos to path where ld can find it by default, for example, /usr/local/lib.
Oct 10 2014
On Friday, 10 October 2014 at 11:41:04 UTC, Rafael wrote:On Wednesday, 26 February 2014 at 00:56:53 UTC, thr4wa wrote:Finally, I "solved" it by the following way: 1) disable linking phobos: -defaultlib= 2) link it manually: -L-lphobos2 (because default link flag -l:libphobos2.a is not worked for me)i already tried LD_LIBRARY_PATH (and alternatives), however, looking deeper it seems like the admin has disabled LD_LIBRARY_PATH on this system (work terminal): http://stackoverflow.com/questions/9843178/linux-capabilities-setcap-seems-to-disable-ld-library-path On Tuesday, 25 February 2014 at 22:37:28 UTC, FreeSlave wrote:Hello, thr4wa, do you solve your problem, described above? I have same error: /usr/bin/ld: cannot find -l:libphobos2.a What I tried to do: 1) export LD_LIBRARY_PATH=/usr/lib64 2) copy libphobos2.a and libphobos2.so to /usr/lib64 3) soft link to this libraries from /usr/lib 4) added dmd -L-L/usr/lib64 compile flags in the dmd.conf file 5) added /usr/lib64 to the /etc/ld.so.confIt's not dmd problem, it's up to ld linker and the issue is same for other compiled languages including C and C++. You should specify LD_LIBRARY_PATH variable in your system before executing any compiled D application. You can add export of this environment variable to your $HOME/.profile or $HOME/.bashrc depending on your system or edit paths in /etc/ld.so.conf.d or /etc/ld.so.conf. The other way is to copy libphobos to path where ld can find it by default, for example, /usr/local/lib.
Oct 10 2014