About 20 minutes ago, I tried to compile a project of mine, and it compiled and linked fine into an executable. I added three D source files, edited some code, and tried to recompile. It failed. That in and of itself is nothing peculiar. However, the build output was:
dub build "accord" "--build=plain"
Building package accord in F:\Development\accord\
Target derelict-util 2.0.0 is up to date. Use --force to rebuild.
Target derelict-glfw3 1.1.0 is up to date. Use --force to rebuild.
Target derelict-gl3 1.0.13 is up to date. Use --force to rebuild.
Building accord ~master configuration "application", build type plain.
Compiling using dmd...
Linking...
Error: cannot read file C:\Users\Spirit.d
FAIL .dub/build/application-plain-windows-x86-dmd_2067-7C65CD25249AF071E7C1F1FC64628B8A
Error executing command build:
dmd failed with exit code 1.
Exit code 2
Build complete -- 1 error, 0 warnings
I am using Mono-D. Any other project I try seems to compile perfectly. I have no idea why Dub is looking in my users directory for a source file. My JSON file is the standard fare generated by Dub with Derelict-Util (v2.0.0), Derelict-GL3 (v1.0.13), and Derelict-GLFW3 (v1.1.0) as dependencies. I have spent some time trawling the interwebs looking for a solution, but might have missed something. If I did, please just point me in the right direction. Thanks!
[Edit] Verbose compiler output
F:\Development\accord>dub --vverbose -c -gc -w -gs -vcolumns
Error processing arguments: Can't parse string: bool should be
case-insensitive 'true' or 'false'
Run 'dub help' for usage information.
F:\Development\accord>dub --verbose -debug
Using dub registry url 'http://code.dlang.org/'
Refreshing local packages (refresh existing: true)...
Looking for local package map at C:\ProgramData\dub\packages\local- packages.json
Looking for local package map at C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\local-packages.json
Note: Failed to determine version of package accord at .. Assuming ~master.
Refreshing local packages (refresh existing: false)...
Looking for local package map at C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\local-packages.json
Found dependency derelict-util 2.0.0
Found dependency derelict-glfw3 1.1.0
Found dependency derelict-gl3 1.0.13
Checking for missing dependencies.
Using fixed selection derelict-util 2.0.0
Using fixed selection derelict-glfw3 1.1.0
Using fixed selection derelict-gl3 1.0.13
Refreshing local packages (refresh existing: false)...
Looking for local package map at C:\ProgramData\dub\packages\local-packages.json
Looking for local package map at C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\local-packages.json
Found dependency derelict-util 2.0.0
Found dependency derelict-glfw3 1.1.0
Found dependency derelict-gl3 1.0.13
Checking for upgrades.
Using cached upgrade results...
Generating using build
Generate target accord (executable F:\Development\accord accord)
Generate target derelict-util (staticLibrary C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\lib DerelictUtil)
Generate target derelict-glfw3 (staticLibrary C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\lib DerelictGLFW3)
Generate target derelict-gl3 (staticLibrary C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\lib DerelictGL3)
Target 'C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\.dub\build\library-debug-windows-x86-dmd_2067-C7756503D110D460F4F4728E71250CDA\DerelictUtil.lib' doesn't exist, need rebuild.
Building derelict-util 2.0.0 configuration "library", build type debug.
Running dmd...
dmd -lib -ofC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\.dub\build\library-debug-windows-x8
6-dmd_2067-C7756503D110D460F4F4728E71250CDA\DerelictUtil.lib -debug -g -w -version=Have_derelict_util -debug=ebug -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\exception.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\loader.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\sharedlib.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\system.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\wintypes.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source\derelict\util\xtypes.d
Copying target from C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\.dub\build\library-debug-windows-x86-dmd_2067-C7756503D110D460F4F4728E71250CDA\DerelictUtil.lib to C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\lib
Target 'C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\.dub\build\library-debug-windows-x86-dmd_2067-256C068A151384E40C20A4D884247016\DerelictGLFW3.lib' doesn't exist, need rebuild.
Building derelict-glfw3 1.1.0 configuration "library", build type debug.
Running dmd...
dmd -lib -ofC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\.dub\build\library-debug-windows-x86-dmd_2067-256C068A151384E40C20A4D884247016\DerelictGLFW3.lib -debug -g -w -version=Have_derelict_glfw3 -version=Have_derelict_util -debug=ebug -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\source -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source C:\Users\Spirit of Fire\AppData\Roaming\dub\packag
es\derelict-glfw3-1.1.0\source\derelict\glfw3\glfw3.d
Copying target from C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\.dub\build\library-debug-windows-x86-dmd_2067-256C068A151384E40C20A4D884247016\DerelictGLFW3.lib to C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\lib
Target 'C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\.dub\build\library-debug-windows-x86-dm
d_2067-80F0E608548819662CF8E3FD924A262A\DerelictGL3.lib' doesn't exist, need rebuild.
Building derelict-gl3 1.0.13 configuration "library", build type debug.
Running dmd...
dmd -lib -ofC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\.dub\build\library-debug-windows-x8
6-dmd_2067-80F0E608548819662CF8E3FD924A262A\DerelictGL3.lib -debug -g -w -version=Have_derelict_gl3 -version=Have_dereli
ct_util -debug=ebug -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source -IC:\Users\Spirit
of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\der
elict-gl3-1.0.13\source\derelict\opengl3\arb.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\
source\derelict\opengl3\cgl.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\o
pengl3\constants.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\depr
ecatedConstants.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\depre
catedFunctions.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\ext.d
C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\functions.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\gl.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\gl3.d C:\Users\Spirit of Fire\AppData\Roaming\dub\pa
ckages\derelict-gl3-1.0.13\source\derelict\opengl3\glx.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\glxext.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\internal.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\types.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\wgl.d C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\source\derelict\opengl3\wglext.d
Copying target from C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\.dub\build\library-debug-wi
ndows-x86-dmd_2067-80F0E608548819662CF8E3FD924A262A\DerelictGL3.lib to C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\lib
Target 'F:\Development\accord\.dub\build\application-debug-windows-x86-dmd_2067-9CBD45F8F21245983EC54AD7179D55CE\accord.exe' doesn't exist, need rebuild.
Building accord ~master configuration "application", build type debug.
Compiling using dmd...
dmd -c -of.dub\build\application-debug-windows-x86-dmd_2067-9CBD45F8F21245983EC54AD7179D55CE\accord.obj -debug -g -w -version=Have_accord -version=Have_derelict_util version=Have_derelict_glfw3 -version=Have_derelict_gl3 -debug=ebug -Isource -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\source -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\source -IC:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.
13\source source\accord\core\opengl\ContextConfigs.d source\accord\core\opengl\FramebufferConfigs.d source\accord\core\system\Window.d source\accord\util\Closable.d source\accord\util\collections\Stack.d source\accord\util\glutil.d source\accord\util\io\FileData.d source\accord\util\io\FileInputStream.d source\accord\util\io\InputStream.d source\accord\util\stringutil.d source\app.d
Linking...
dmd -of.dub\build\application-debug-windows-x86-dmd_2067-9CBD45F8F21245983EC54AD7179D55CE\accord.exe .dub\build\applicat
ion-debug-windows-x86-dmd_2067-9CBD45F8F21245983EC54AD7179D55CE\accord.obj C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-glfw3-1.1.0\lib\DerelictGLFW3.lib C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-gl3-1.0.13\lib\DerelictGL3.lib C:\Users\Spirit of Fire\AppData\Roaming\dub\packages\derelict-util-2.0.0\lib\DerelictUtil.lib -g
Error: cannot read file C:\Users\Spirit.d
FAIL .dub\build\application-debug-windows-
x86-dmd_2067-9CBD45F8F21245983EC54AD7179D55CE\ accord executable
Error executing command run:
dmd failed with exit code 1.
[EDIT]: I've identified the problem. The linker seems to think that I am building a library, and not an app. I don't know what I did to do that, but I don't know how to fix it. So, my question now is this: how to I change it back? Thanks.
[EDIT]: Nevermind. Changing the build type to executable did nothing.
[EDIT]: I tried using dub v0.9.22 (from v0.9.23) and it appears to link fine. I have no idea what's going on.
I suspect that the source files you added brought some hidden dependencies - go have a look for some imported 'Spirit' module, that should clearify why dmd (not dub(!) - it's dmd which fails to look for said import) can't find the file.
The C:\Users path seems to be a last resort where dmd looks for imported files.
[Edit] It's failing to link the entire thing whereas it should fail to compile all the stuff - that could be a hint either.
Related
I am trying to install the python package "imblearn" to balanace datasets,
with the command pip install imblearn.
but it keeps failing.
trying from cmdand from PowerShell with admin privileges,
with regular pip command, and with git clone to the repo and then pip install.
everything is failing.
the error is:
C:\Users\ronke>pip install imblearn
Collecting imblearn
Using cached imblearn-0.0-py2.py3-none-any.whl (1.9 kB)
Collecting imbalanced-learn
Using cached imbalanced_learn-0.10.1-py3-none-any.whl (226 kB)
Requirement already satisfied: scipy>=1.3.2 in c:\networks\python3.8\lib\site-packages (from imbalanced-learn->imblearn) (1.6.3)
Collecting scikit-learn>=1.0.2
Using cached scikit-learn-1.2.0.tar.gz (7.2 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [73 lines of output]
Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
Collecting setuptools<60.0
Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)
Collecting wheel
Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
Collecting Cython>=0.29.24
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting oldest-supported-numpy
Using cached oldest_supported_numpy-2022.11.19-py3-none-any.whl (4.9 kB)
Collecting scipy>=1.3.2
Using cached scipy-1.9.3.tar.gz (42.1 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1
[37 lines of output]
+ meson setup --prefix=c:\networks\python3.8 C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb\.mesonpy-jv80z8m8\build --native-file=C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb\.mesonpy-native-file.ini -Ddebug=false -Doptimization=2
The Meson build system
Version: 1.0.0
Source dir: C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb
Build dir: C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb\.mesonpy-jv80z8m8\build
Build type: native build
Project name: SciPy
Project version: 1.9.3
Activating VS 17.1.3
C compiler for the host machine: cl (msvc 19.31.31105 "Microsoft (R) C/C++ Optimizing Compiler Version 19.31.31105 for x64")
C linker for the host machine: link link 14.31.31105.0
C++ compiler for the host machine: cl (msvc 19.31.31105 "Microsoft (R) C/C++ Optimizing Compiler Version 19.31.31105 for x64")
C++ linker for the host machine: link link 14.31.31105.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wno-unused-but-set-variable: NO
Compiler for C supports arguments -Wno-unused-but-set-variable: NO (cached)
Compiler for C supports arguments -Wno-unused-function: NO
Compiler for C supports arguments -Wno-conversion: NO
Compiler for C supports arguments -Wno-misleading-indentation: NO
Compiler for C supports arguments -Wno-incompatible-pointer-types: NO
Library m found: NO
..\..\meson.build:57:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
The following exception(s) were encountered:
Running `ifort --version` gave "[WinError 2] The system cannot find the file specified"
Running `ifort -V` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `gfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `flang --version` gave "[WinError 2] The system cannot find the file specified"
Running `flang -V` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran --version` gave "[WinError 2] The system cannot find the file specified"
Running `pgfortran -V` gave "[WinError 2] The system cannot find the file specified"
Running `g95 --version` gave "[WinError 2] The system cannot find the file specified"
Running `g95 -V` gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\ronke\AppData\Local\Temp\pip-install-n9p_hxtm\scipy_cef72cd617894d719469ea6e03d892cb\.mesonpy-jv80z8m8\build\meson-logs\meson-log.txt
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
Does someone know how to fix it?
thanks
Ron
I've condensed this to show the key part of the error:
Collecting scipy>=1.3.2
Using cached scipy-1.9.3.tar.gz (42.1 MB)
...
..\..\meson.build:57:0: ERROR: Unknown compiler(s): [['ifort'], ['gfortran'], ['flang'], ['pgfortran'], ['g95']]
Which is saying that scipy==1.9.3 failed to compile because a Fortran compiler was not availalbe.
This is probably caused by a 32-bit version of Python / Windows, since pre-compiled scipy and scikit-learn wheels are being phased out for 32-bit systems, and we're no longer testing 32-bit Windows in imblearn (see PR#936).
One possible fix is to install a copy of Python with Anaconda or Miniconda, then:
conda install -c conda-forge imbalanced-learn
I met the problem when compiling the source code of mpc which will depend on gmp.
The command to compile mpc is as below.
./configure --with-mpfr=/home/wy/tmp/mpfr-4.0.2/ins --with-gmp=/home/wy/tmp/gmp-6.2.0/ins --prefix=/home/wy/tmp/mpc-1.1.0/ins
The gmp has been installed into /home/user/tmp/gmp-6.2.0/ins successfully.
The error when compiling mpc with libtool is as below.
/bin/bash ../libtool --tag=CC --mode=link gcc -std=gnu99 -O2 -pedantic -fomit-frame-pointer -m64 -mtune=corei7 -march=corei7 -version-info 4:0:1 -L/home/wy/tmp/gmp-6.2.0/ins/lib -L/home/wy/tmp/mpfr-4.0.2/ins/lib -o libmpc.la -rpath /home/wy/tmp/mpc-1.1.0/ins/lib abs.lo acos.lo acosh.lo add.lo add_fr.lo add_si.lo add_ui.lo arg.lo asin.lo asinh.lo atan.lo atanh.lo clear.lo cmp.lo cmp_abs.lo cmp_si_si.lo conj.lo cos.lo cosh.lo div_2si.lo div_2ui.lo div.lo div_fr.lo div_ui.lo exp.lo fma.lo fr_div.lo fr_sub.lo get_prec2.lo get_prec.lo get_version.lo get_x.lo imag.lo init2.lo init3.lo inp_str.lo log.lo log10.lo mem.lo mul_2si.lo mul_2ui.lo mul.lo mul_fr.lo mul_i.lo mul_si.lo mul_ui.lo neg.lo norm.lo out_str.lo pow.lo pow_fr.lo pow_ld.lo pow_d.lo pow_si.lo pow_ui.lo pow_z.lo proj.lo real.lo rootofunity.lo urandom.lo set.lo set_prec.lo set_str.lo set_x.lo set_x_x.lo sin.lo sin_cos.lo sinh.lo sqr.lo sqrt.lo strtoc.lo sub.lo sub_fr.lo sub_ui.lo swap.lo tan.lo tanh.lo uceil_log2.lo ui_div.lo ui_ui_sub.lo -lmpfr -lmpfr -lgmp -lm
/bin/grep: /usr/local/lib/libgmp.la: No such file or directory
/bin/sed: can't read /usr/local/lib/libgmp.la: No such file or directory
libtool: error: '/usr/local/lib/libgmp.la' is not a valid libtool archive
Makefile:432: recipe for target 'libmpc.la' failed
make[2]: *** [libmpc.la] Error 1
make[2]: Leaving directory '/home/wy/tmp/mpc-1.1.0/src'
Makefile:465: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/wy/tmp/mpc-1.1.0'
Makefile:375: recipe for target 'all' failed
make: *** [all] Error 2
From the error message, we can see that the lib path has been indicated as -L/home/wy/tmp/gmp-6.2.0/ins/lib. But libtool still can't find the lib.
This is going to be hard to answer easily, but it seems like you have some other .la file that references it, and causes it to fail this way. Paths within .la files are always absolute. See this old blog post of mine for details.
My best guess for your particular case, is that you have an old copy of mpfr installed in /usr/local — and that is taking precedence over the one you want to use.
The problem appears to be in the MPFR configure scripts or makefile, not in MPC!
As you can see above, it's not looking for libgmp.la in the place you specified on the command-line, but in the default installation location. The reason for this is that the location of libgmp.la is specified incorrectly in libmpfr.la! It's not MPC's fault...
I was able to work around the problem by editing libmpfr.la, which you can find where you specified the MPFR libraries to go, and change the location to libgmp.la from /usr/lib/libgmp.la to the actual location where you targeted the GMP libraries.
The line in libgmp.la should look like this:
# Libraries that this one depends upon.
dependency_libs=' -L/your/mpfr/lib/target /your/gmp/lib/target/libgmp.la
Where "/your/mpfr/lib/target" should be where you told MPFR to put its library files, and "/your/gmp/lib/target" needs to be changed to where you told GMP to put its library files.
i have tried installing Apache Axis2/C on Linux but no success.. with libxml2
Here are my efforts
1) libxml2 was installed successfully
Flags : LIBXML2_CFLAGS = -I/usr/local/include/libxml2
LIBXML2_LIBS='-L/usr/local/lib/hpux32 -lxml2 -lz -lpthread -liconv -lm'
AXIS2C_HOME = /tmp
LD_LIBRARY_PATH = {$LD_LIBRARY_PATH}:$AXIS2C_HOME/lib
Ran --prefix=${AXIS2C_HOME} --enable-libxml2=yes
Installation fails with following error:
checking whether to build libxml2 xml parser library... checking pkg-config is at least version 0.9.0... ./configure[21268]: /local/lib/hpux32.
no
yes
checking for LIBXML2... configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables LIBXML2_CFLAGS
and LIBXML2_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
i do not hold pkg-config utility but i have set LIBXML2_CFLAGS and LIBXML2_LIBS, configuration file does not have any information.
can someone please assist here?
Thanks,
Hilesh
I'm using Eclipse Juno CDT.
I added the following to my project:
the mysql/includes path to the includes path setting
the libmysql.lib and zlib.lib to libraries setting
the mysql library path to the library paths setting
Now, when I make my project, the compilation throws an error when I run the application.
This is the build:
10:08:56 **** Build of configuration Debug for project mysqlapp ****
make all
Building file: ../src/mysqlapp.c
Invoking: Cygwin C Compiler
gcc -I"C:\Program Files\MySQL\MySQL Connector C 6.0.2\include" -O0 -g3 -Wall -c -fmessage-length=0 -MMD -MP -MF"src/mysqlapp.d" -MT"src/mysqlapp.d" -o "src/mysqlapp.o" "../src/mysqlapp.c"
cygwin warning:
MS-DOS style path detected: C:\Users\Yonaton\workspace\mysqlapp\Debug
Preferred POSIX equivalent is: /cygdrive/c/Users/Yonaton/workspace/mysqlapp/Debug
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Finished building: ../src/mysqlapp.c
Building target: mysqlapp.exe
Invoking: Cygwin C Linker
gcc -L"C:\Program Files\MySQL\MySQL Connector C 6.0.2\lib\opt" -o "mysqlapp.exe" ./src/mysqlapp.o
Finished building target: mysqlapp.exe
And this is the run within eclipse:
10:09:55 **** Incremental Build of configuration Debug for project mysqlapp ****
make all
src/mysqlapp.d:1: *** multiple target patterns. Stop.
10:09:56 Build Finished (took 225ms)
Under Project->Properties->C/C++ General->Paths and Symbols->Libraries do not add the file name of the library, nor the path.
So if you want to link against /lib64/libz.so just add z.
Or alternativly add the z under Project->Properties->C/C++ Build->Settings->GCC Linker->Libraries.
If the library is not located under a standard path add the custom search path for a library under Project->Properties->C/C++ General->Paths and Symbols->Libraries Paths.
Update (referring "multiple target patterns"):
make does not like DOS paths. In the .d file a : after the drive letter is interpreted as target delimiter.
Switch to UNIX paths (as you were already told to do ... ;-)).
(see also: "multiple target patterns" Makefile error)
If I remember correctly "-l" ( small L) before your libraries.
I have this problem with freeradius module.
I'm trying to add my custom module, but after I launch radius server in debug mode it shows me this error:
/usr/local/etc/raddb/modules/m2[2]: Failed to link to module 'rlm_m2': libmysql.so.16: cannot open shared object file: No such file or directory
/usr/local/etc/raddb/sites-enabled/default[224]: Failed to load module "m2".
/usr/local/etc/raddb/sites-enabled/default[69]: Errors parsing authorize section.
My system is Ubuntu 12, all mysql packages are installed correctly(there does exist libmysql.so.16 in usr/lib/mysql) freeradius runs smoothly with default parameters and so on. I really don't have an idea what exactly can't find this mysql library or how to show it to it.
Try compile like this:
gcc -I/usr/include/mysql rlm_m2.c -o rlm_m2 -lmysqlclient -lnsl -lm -lz\
-L/usr/lib/mysql -L/usr/lib/mysql -L/usr/lib64/mysql