Difficulty compiling Mumps - compilation
I've been trying to compile Mumps as a linear solver for IPOPT following these instructions here. https://mdolab-pyoptsparse.readthedocs-hosted.com/en/latest/optimizers/IPOPT.html And then later using this script here https://github.com/OpenMDAO/build_pyoptsparse/
When I attempt to do so however I get error messages like this and I'm unsure if these files manage to compile. I've only started using linux and I don't have much experience with compiling. What am I doing wrong? Do I need to set up my compiler somehow?
make all-am
make[1]: Entering directory '/home/rory/Documents/untitled folder/build_pyoptsparse.601acad7/ThirdParty-Mumps'
CC metis_adapter.lo
F77 MUMPS/libseq/mpi.lo
CC MUMPS/libseq/mpic.lo
PPF77 MUMPS/src/tools_common_mod.lo
CC MUMPS/libseq/elapse.lo
PPF77 MUMPS/src/dmumps_comm_buffer.lo
PPF77 MUMPS/src/dmumps_struc_def.lo
PPF77 MUMPS/src/mumps_ooc_common.lo
PPF77 MUMPS/src/mumps_static_mapping.lo
MUMPS/libseq/mpi.f:601:72:
CALL MUMPS_COPY_LOGICAL( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to LOGICAL(4) [-Wargument-mismatch]
MUMPS/libseq/mpi.f:603:72:
CALL MUMPS_COPY_REAL( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to REAL(4) [-Wargument-mismatch]
MUMPS/libseq/mpi.f:606:72:
CALL MUMPS_COPY_DOUBLE_PRECISION( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to REAL(8) [-Wargument-mismatch]
MUMPS/libseq/mpi.f:608:72:
CALL MUMPS_COPY_COMPLEX( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to COMPLEX(4) [-Wargument-mismatch]
MUMPS/libseq/mpi.f:610:72:
CALL MUMPS_COPY_DOUBLE_COMPLEX( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to COMPLEX(8) [-Wargument-mismatch]
MUMPS/libseq/mpi.f:612:72:
CALL MUMPS_COPY_2DOUBLE_PRECISION( SENDBUF, RECVBUF, COUNT )
1
Warning: Type mismatch in argument ‘s’ at (1); passed INTEGER(4) to REAL(8) [-Wargument-mismatch]
PPF77 MUMPS/src/mumps_sol_es.lo
PPF77 MUMPS/src/mumps_part9.lo
CC MUMPS/src/mumps_c.lo
CC MUMPS/src/mumps_common.lo
CC MUMPS/src/mumps_orderings.lo
CC MUMPS/src/mumps_io.lo
CC MUMPS/src/mumps_io_basic.lo
CC MUMPS/src/mumps_io_thread.lo
CC MUMPS/src/mumps_io_err.lo
CC MUMPS/src/mumps_size.lo
MUMPS/src/mumps_io_thread.c: In function ‘mumps_low_level_init_ooc_c_th’:
MUMPS/src/mumps_io_thread.c:345:82: warning: ‘Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=’ directive writing 84 bytes into a region of size 64 [-Wformat-overflow=]
sprintf(buf,"Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=%d\n",*async);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
MUMPS/src/mumps_io_thread.c:345:5: note: ‘sprintf’ output between 87 and 97 bytes into a destination of size 64
sprintf(buf,"Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=%d\n",*async);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
MUMPS/src/mumps_io_thread.c:382:86: warning: ‘Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=’ directive writing 84 bytes into a region of size 64 [-Wformat-overflow=]
sprintf(buf,"Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=%d\n",*async);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
MUMPS/src/mumps_io_thread.c:382:9: note: ‘sprintf’ output between 87 and 97 bytes into a destination of size 64
sprintf(buf,"Internal error: mumps_low_level_init_ooc_c_th should not to be called with strat_IO=%d\n",*async);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
PPF77 MUMPS/src/dmumps_ooc_buffer.lo
PPF77 MUMPS/src/dmumps_load.lo
PPF77 MUMPS/src/dmumps_part7.lo
PPF77 MUMPS/src/dmumps_ooc.lo
PPF77 MUMPS/src/dmumps_part4.lo
PPF77 MUMPS/src/dmumps_part3.lo
PPF77 MUMPS/src/dmumps_part8.lo
PPF77 MUMPS/src/dmumps_part2.lo
PPF77 MUMPS/src/dmumps_part6.lo
MUMPS/src/dmumps_part2.F:4416:31:
CALL DMUMPS_557(id%N, IPE(1), NV(1), IPS(1), NE(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ipe’ at (1)
MUMPS/src/dmumps_part2.F:4426:25:
CALL DMUMPS_201(NE(1), ND(1), id%INFOG(6), id%INFOG(5),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ne’ at (1)
MUMPS/src/dmumps_part2.F:4463:36:
CALL DMUMPS_97(id%N, FRERE(1), FILS(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘frere’ at (1)
MUMPS/src/dmumps_part2.F:4475:33:
CALL DMUMPS_97(id%N, FRERE(1), FILS(1), NFSIZ(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘frere’ at (1)
MUMPS/src/dmumps_part6.F:3575:14:
& root%SCHUR_POINTER(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘val_root’ at (1)
MUMPS/src/dmumps_part6.F:3615:14:
& root%RG2L_ROW(1), root%RG2L_COL(1), INVERT,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rg2l_row’ at (1)
MUMPS/src/dmumps_part2.F:2851:19:
& PERM,FLAG(1))
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘posi’ at (1)
MUMPS/src/dmumps_part2.F:2854:19:
& PERM,FLAG(1))
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘posi’ at (1)
MUMPS/src/dmumps_part8.F:545:36:
CALL DMUMPS_535( MTYPE, id%ISOL_loc(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘isol_loc’ at (1)
MUMPS/src/dmumps_part8.F:1224:36:
CALL DMUMPS_535( MTYPE, id%ISOL_loc(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘isol_loc’ at (1)
MUMPS/src/dmumps_part8.F:1756:32:
& id%MYID_NODES, id%PTLUST_S(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ptrist’ at (1)
MUMPS/src/dmumps_part8.F:1764:32:
& id%MYID_NODES, id%PTLUST_S(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ptrist’ at (1)
MUMPS/src/dmumps_part8.F:1796:23:
& MTYPE, RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:1805:23:
& MTYPE, RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:3753:13:
& root%IPIV(1), root%LPIV, MASTER_ROOT, MYID_NODES,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ipiv’ at (1)
MUMPS/src/dmumps_part8.F:2101:39:
CALL DMUMPS_245(id%root, id%N, id%S(1), LA_PASSED,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘a’ at (1)
MUMPS/src/dmumps_part8.F:2141:42:
CALL DMUMPS_245(id%root, id%N, id%S(1), LA_PASSED,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘a’ at (1)
MUMPS/src/dmumps_part8.F:2253:23:
& MTYPE, RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:2264:16:
& RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:2277:23:
& MTYPE, RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:2287:16:
& RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:2344:23:
& MTYPE, RHS_MUMPS(IBEG), LD_RHS, NBRHS_EFF,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘rhs’ at (1)
MUMPS/src/dmumps_part8.F:2707:49:
& JDUMMY, id%KEEP(1), id%KEEP8(1), id%PROCNODE_STEPS(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘procnode_steps’ at (1)
MUMPS/src/dmumps_part8.F:2715:16:
& id%PTLUST_S(1), id%KEEP(1), id%KEEP8(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ptrist’ at (1)
MUMPS/src/dmumps_part8.F:2726:42:
CALL DMUMPS_245( id%root, id%N, id%S(1), LA_PASSED,
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘a’ at (1)
MUMPS/src/dmumps_part8.F:2772:48:
& JDUMMY, id%KEEP(1),id%KEEP8(1), id%PROCNODE_STEPS(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘procnode_steps’ at (1)
MUMPS/src/dmumps_part8.F:2782:16:
& id%PTLUST_S(1), id%KEEP(1),id%KEEP8(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘ptrist’ at (1)
MUMPS/src/dmumps_part3.F:6046:21:
& id%ELTVAR( IELTPTR ), id%A_ELT( RELTPTR ),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘eltvar’ at (1)
MUMPS/src/dmumps_part3.F:6064:17:
& id%ELTVAR(IELTPTR),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘elnodes’ at (1)
MUMPS/src/dmumps_part3.F:6072:17:
& id%ELTVAR(IELTPTR),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘elnodes’ at (1)
MUMPS/src/dmumps_part3.F:6104:17:
& id%ELTVAR(IELTPTR),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘elnodes’ at (1)
PPF77 MUMPS/src/dmumps_part1.lo
PPF77 MUMPS/src/dmumps_part5.lo
MUMPS/src/dmumps_part5.F:432:44:
CALL DMUMPS_564(id%KEEP(38), id%PROCNODE(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘procnode’ at (1)
MUMPS/src/dmumps_part5.F:439:44:
CALL DMUMPS_537(id%N,id%NSLAVES,ICNTL(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘icntl’ at (1)
MUMPS/src/dmumps_part5.F:1311:14:
& id%CANDIDATES(1,1), id%I_AM_CAND(1) )
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘candidates’ at (1)
MUMPS/src/dmumps_part5.F:1668:20:
& id%N, id%MAPPING(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘mapping’ at (1)
MUMPS/src/dmumps_part5.F:5128:8:
& id%DBLARR(1), KEEP(13), id%INTARR(1),
1
Warning: Element of assumed-shaped or pointer array passed to array dummy argument ‘dblarr’ at (1)
F77LD libcoinmumps.la
make[1]: Leaving directory '/home/rory/Documents/untitled folder/build_pyoptsparse.601acad7/ThirdParty-Mumps'
make[1]: Entering directory '/home/rory/Documents/untitled folder/build_pyoptsparse.601acad7/ThirdParty-Mumps'
/bin/mkdir -p '/home/rory/ipopt/lib/pkgconfig'
/bin/mkdir -p '/home/rory/ipopt/include/coin-or/mumps'
/bin/mkdir -p '/home/rory/ipopt/lib'
/usr/bin/install -c -m 644 coinmumps.pc '/home/rory/ipopt/lib/pkgconfig'
/bin/bash ./libtool --mode=install /usr/bin/install -c libcoinmumps.la '/home/rory/ipopt/lib'
/usr/bin/install -c -m 644 MUMPS/include/dmumps_c.h MUMPS/include/mumps_c_types.h MUMPS/libseq/mumps_mpi.h mumps_compat.h '/home/rory/ipopt/include/coin-or/mumps'
libtool: install: /usr/bin/install -c .libs/libcoinmumps.so.2.1.0 /home/rory/ipopt/lib/libcoinmumps.so.2.1.0
libtool: install: (cd /home/rory/ipopt/lib && { ln -s -f libcoinmumps.so.2.1.0 libcoinmumps.so.2 || { rm -f libcoinmumps.so.2 && ln -s libcoinmumps.so.2.1.0 libcoinmumps.so.2; }; })
libtool: install: (cd /home/rory/ipopt/lib && { ln -s -f libcoinmumps.so.2.1.0 libcoinmumps.so || { rm -f libcoinmumps.so && ln -s libcoinmumps.so.2.1.0 libcoinmumps.so; }; })
libtool: install: /usr/bin/install -c .libs/libcoinmumps.lai /home/rory/ipopt/lib/libcoinmumps.la
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /home/rory/ipopt/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/rory/ipopt/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Related
The result of using strtol() under stdlib.h and stdio.h is different
When trying to parse a number too big to fit a long, strtol() returns 0 instead of LONG_MAX (stdio.h). If I read the POSIX spec correctly, it should be LONG_MAX. There is a different between stdio.h and stdlib.h #include "stdio.h" int main(void){ printf("%ld\n", strtol("99999999999999999999999")); return 0; } # 0 #include "stdio.h" //#include "stdlib.h" int main(void){ char *end[500]; printf("%ld\n", strtol("99999999999999999999999", end, 10)); return 0; } # 9223372036854775807
strtol is declared in header <stdlib.h> as long strtol( const char *restrict str, char **restrict str_end, int base ); // ^^^^^^^^ ^^^^^^^^ since C99 In the first posted snippet, <stdlib.h> is not included and the function is called with one single argument, so that, if compiled with -Wall -Wextra -std=gnu11, gcc produces the following explanatory warnings before outputting 0: prog.c: In function 'main': prog.c:5:21: warning: implicit declaration of function 'strtol' [-Wimplicit-function-declaration] printf("%ld\n", strtol("99999999999999999999999")); ^~~~~~ prog.c:5:15: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'int' [-Wformat=] printf("%ld\n", strtol("99999999999999999999999")); ~~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ %d Which means that the library function is not called at all and an implicitly declared function with the same name is called, an int with value 0 is returned and printed (with the wrong format specifier, which is itself undefined behavior). Note that the same code fails to compile with clang, which reports the following: prog.c:4:21: warning: implicitly declaring library function 'strtol' with type 'long (const char *, char **, int)' [-Wimplicit-function-declaration] printf("%ld\n", strtol("99999999999999999999999")); ^ prog.c:4:21: note: include the header <stdlib.h> or explicitly provide a declaration for 'strtol' prog.c:4:53: error: too few arguments to function call, expected 3, have 1 printf("%ld\n", strtol("99999999999999999999999")); ~~~~~~ ^ 1 warning and 1 error generated. In the second snippet, strtol is called with the right number of arguments, but, as posted (with the #include commented out), has the same missing header problem. To produce the expected output, LONG_MAX, header stdlib.h has to be included.
Decltype Bug Gcc wont compile
source code https://github.com/kennywakeland/Decltype-Bug/blob/master/main.cpp Test compile https://coliru.stacked-crooked.com/a/443f03625728f00e This code is to test the setters and getters, using macros. I want to pass in the variable name. decltype is not returning the right type to the HTestSet. Any idea why it is not returning the correct value type ? Compiler error g++ -std=c++11 -O2 -Wall -pedantic -pthread main.cpp && ./a.out main.cpp: In function 'int main()': main.cpp:26:72: error: no matching function for call to 'HTestSet(TestClass&, void (BaseClass::*)(int), int&)' if(HTestSet(OBGEC_ON, &decltype(OBGEC_ON)::SET_CALL, test_vall_stor)){ ^ main.cpp:18:1: note: in expansion of macro 'H_TEST_VALUE_GET_SET' H_TEST_VALUE_GET_SET(H_GET_VALUE(OBGEC_ON, VAL_NAME), \ ^~~~~~~~~~~~~~~~~~~~ main.cpp:92:5: note: in expansion of macro 'H_TEST_VALUE' H_TEST_VALUE(woo, Green, 3); ^~~~~~~~~~~~
This is not a bug (as far I can tell) and has nothing to do with decltype. The problem is that setGreen is a non-virtual member function of BaseClass, and since you did not re-declare such function in TestClass, the type of: &TestClass::setGreen is: void (BaseClass::*)(int) ...and thus you have a template parameter conflict in your template instantiation of HTestSet. I did not find a better standard quote for this than the example in [expr.unary.op#3]: The result of the unary & operator is a pointer to its operand. The operand shall be an lvalue or a qualified-id. If the operand is a qualified-id naming a non-static or variant member m of some class C with type T, the result has type “pointer to member of class C of type T” and is a prvalue designating C::m. [...] struct A { int i; }; struct B : A { }; ... &B::i ... // has type int A::* The use of f at the beginning of your main only works because a void (BaseClass::*)(int) can be implicitly converted to a void (TestClass::*)(int) in this case, [conv.mem#2]: A prvalue of type “pointer to member of B of type cv T”, where B is a class type, can be converted to a prvalue of type “pointer to member of D of type cv T”, where D is a derived class ([class.derived]) of B. [...] Since the result has type “pointer to member of D of type cv T”, indirection through it with a D object is valid. The result is the same as if indirecting through the pointer to member of B with the B subobject of D.
Make error - Installing package (regviewer) Error 1
I am trying to install the "regiviewer" application. As far as Im aware I have installed all the required dependencies. As I go to ./configure the package, it completes this, returning no error and prompts me to 'make' (compile the package). Upon doing so I get the following errors outputted: make[2]: *** [ntreg.o] Error 1 make[2]: Leaving directory `/usr/local/src/regviewer-0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/regviewer-0.1' make: *** [all] Error 2 I do not know what this means or how to rectify this. (fairly new to Linux) Any help would be much appreciated :) The full output is shown below: /usr/local/src/regviewer-0.1$ make make all-recursive make[1]: Entering directory `/usr/local/src/regviewer-0.1' Making all in src make[2]: Entering directory `/usr/local/src/regviewer-0.1/src' gcc -DHAVE_CONFIG_H -I. -I.. -DPACKAGE_DATA_DIR=\""/usr/local/share"\" -DPACKAGE_LOCALE_DIR=\""/usr/local//locale"\" -pthread -DORBIT2=1 -D_REENTRANT -I/usr /include/libgnomeui-2.0 -I/usr/include /libart-2.0 -I/usr/include/gconf/2 -I/usr/include/gnome-keyring-1 -I/usr /include/libgnome-2.0 -I/usr/include /libbonoboui-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/libxml2 -I/usr/include/pango-1.0 -I/usr/include/gail-1.0 -I/usr/include/freetype2 -I/usr/include/atk-1.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/cairo -I/usr/include/gio-unix-2.0/ -I/usr/include/pixman-1 -I/usr/include/libpng12 -g -O2 -MT ntreg.o -MD -MP -MF .deps/ntreg.Tpo -c -o ntreg.o ntreg.c ntreg.c: In function ‘parse_nk’: ntreg.c:378:29: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:379:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:380:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:381:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:382:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:383:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:384:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:385:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:386:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:387:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:388:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:389:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:391:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘parse_vk’: ntreg.c:410:31: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:412:31: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:413:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:415:18: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:417:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:418:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:420:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘parse_sk’: ntreg.c:438:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:439:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:440:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:442:46: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:444:46: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘parse_lf’: ntreg.c:462:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:471:12: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘parse_lh’: ntreg.c:490:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:496:12: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘parse_li’: ntreg.c:517:3: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c:522:5: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘long int’ [-Wformat] ntreg.c: In function ‘nk_ls’: ntreg.c:1326:7: warning: field width specifier ‘*’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] ntreg.c: In function ‘put_dword’: ntreg.c:1999:17: error: lvalue required as left operand of assignment ntreg.c: In function ‘fmyinput’: ntreg.c:69:9: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result] make[2]: *** [ntreg.o] Error 1 make[2]: Leaving directory `/usr/local/src/regviewer-0.1/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/usr/local/src/regviewer-0.1' make: *** [all] Error 2 The ntreg.c file: lines 1989 - 2000 /* And, yer basic DWORD write */ int put_dword(struct hive *hdesc, int vofs, char *path, int dword) { struct keyval *kr; int r; ALLOC(kr,1,sizeof(int)+sizeof(int)); kr->len = sizeof(int); (int)kr->data = dword; r = put_buf2val(hdesc, kr, vofs, path, REG_DWORD); FREE(kr); return(r); } /* ================================================================ */
The error on the line in question appears to have been corrected in the upstream source between the date in 2003 that the 0.1 release was cut and the date in 2009 that the latest change was made in the CVS repo. I have no idea if the CVS code will ultimately work better or if the project, once compiled, will work at all correctly but that updated code base is likely a better place to start trying to work from.
sphinx install error
I tried to install Sphinx on MacOSX snow leopard 10.6.4. The steps I followed are: ./configure --prefix=/usr/local --with-mysql=/usr/local/mysql make sudo make install While 'make', I get the following errors: Making all in src if test -d ../.svn; then svn info .. --xml | perl svnxrev.pl; fi; make all-am g++ -DHAVE_CONFIG_H -I. -I../config -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include -I/usr/local/mysql/include -Os -g -fno-common -fno-strict-aliasing -arch i386 -Wall -g -D_FILE_OFFSET_BITS=64 -O3 -DNDEBUG -MT sphinx.o -MD -MP -MF .deps/sphinx.Tpo -c -o sphinx.o sphinx.cpp In file included from /usr/include/sql.h:92, from /usr/include/sqlext.h:82, from sphinx.h:69, from sphinx.cpp:14: /usr/include/iodbcunix.h:128: error: conflicting declaration ‘typedef unsigned int DWORD’ sphinxstd.h:90: error: ‘DWORD’ has a previous declaration as ‘typedef long unsigned int DWORD’ sphinx.cpp: In function ‘char* sphStrMacro(const char*, const char*, SphDocID_t)’: sphinx.cpp:1912: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ sphinx.cpp: In function ‘CSphString sphDumpAttr(const CSphColumnInfo&)’: sphinx.cpp:4784: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long unsigned int’ sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpHeader(FILE*, const char*)’: sphinx.cpp:14563: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ sphinx.cpp:14592: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ sphinx.cpp:14631: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpDocids(FILE*)’: sphinx.cpp:14647: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long unsigned int’ sphinx.cpp:14648: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘DWORD’ sphinx.cpp:14655: warning: format ‘%u’ expects type ‘unsigned int’, but argument 2 has type ‘long unsigned int’ sphinx.cpp:14655: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘SphDocID_t’ sphinx.cpp: In member function ‘virtual void CSphIndex_VLN::DebugDumpHitlist(FILE*, const char*)’: sphinx.cpp:14710: warning: format ‘%u’ expects type ‘unsigned int’, but argument 3 has type ‘SphDocID_t’ sphinx.cpp:14710: warning: format ‘%08x’ expects type ‘unsigned int’, but argument 4 has type ‘DWORD’ sphinx.cpp: In member function ‘bool CSphSource_SQL::RunQueryStep(const char*, CSphString&)’: sphinx.cpp:18346: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ sphinx.cpp:18347: warning: format ‘%u’ expects type ‘unsigned int’, but argument 4 has type ‘SphDocID_t’ sphinx.cpp: In member function ‘const char* CSphSource_XMLPipe2::DecorateMessageVA(const char*, char*)’: sphinx.cpp:20238: warning: format ‘%u’ expects type ‘unsigned int’, but argument 6 has type ‘SphDocID_t’ sphinx.cpp: In member function ‘virtual bool CSphSource_ODBC::SqlQuery(const char*)’: sphinx.cpp:21288: warning: comparison between signed and unsigned integer expressions sphinx.cpp: At global scope: sphinx.cpp:1741: warning: ‘g_tmInitTimer’ defined but not used make[2]: *** [sphinx.o] Error 1 make[1]: *** [all] Error 2 make: *** [all-recursive] Error 1 I checked the directory of MySQL is correct.
I found the following suggestions helpful: 1. add the following parameter to configure: --with-unixodbc=no if you still get errors, try setting LDFLAGS to '-arch i386'
Mac OS X binaries are available for 2.0.1b from http://sphinxsearch.com/downloads/
install Ruby 1.8.6 with rvm in Mac OS X 10.6 Snow Leopard failed
I'm trying to learn Ruby on Rails and wanted to follow Apple's example: http://developer.apple.com/tools/developonrailsleopard.html It requires Ruby 1.8.6 and Rails 2.0.2 My machines is already updated to 1.9.1. I wanted to use rvm to install 1.8.6 but it failed during make with the following log: [2010-10-20 10:43:31] make eval.c: In function ‘rb_eval_string_wrap’: eval.c:1743: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_eval_cmd’: eval.c:1884: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘call_trace_func’: eval.c:2735: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_raise_jump’: eval.c:4760: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘method_missing’: eval.c:5684: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_call0’: eval.c:5847: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_f_eval’: eval.c:6634: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘exec_under’: eval.c:6658: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_load’: eval.c:6894: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘call_end_proc’: eval.c:7924: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘rb_f_END’: eval.c:7937: warning: assignment discards qualifiers from pointer target type eval.c: In function ‘mproc’: eval.c:9557: warning: assignment discards qualifiers from pointer target type file.c: In function ‘lchmod_internal’: file.c:1787: warning: cast from pointer to integer of different size gc.c: In function ‘obj_free’: gc.c:1287: warning: initialization from incompatible pointer type regex.c: In function ‘ruby_re_compile_pattern’: regex.c:1362: warning: format ‘%d’ expects type ‘int’, but argument 7 has type ‘long int’ regex.c:2026: warning: format ‘%d’ expects type ‘int’, but argument 6 has type ‘long int’ ptr.c: In function ‘rb_dlptr_inspect’: ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘struct ptr_data *’ ptr.c:461: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 8 has type ‘void *’ void char short int long float double sym.c: In function ‘rb_dlsym_inspect’: sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 6 has type ‘struct sym_data *’ sym.c:270: warning: format ‘%lx’ expects type ‘long unsigned int’, but argument 7 has type ‘void *’ ossl_asn1.c: In function ‘decode_bool’: ossl_asn1.c:313: warning: passing argument 2 of ‘d2i_ASN1_BOOLEAN’ from incompatible pointer type ossl_asn1.c: In function ‘decode_int’: ossl_asn1.c:328: warning: passing argument 2 of ‘d2i_ASN1_INTEGER’ from incompatible pointer type ossl_asn1.c: In function ‘decode_bstr’: ossl_asn1.c:347: warning: passing argument 2 of ‘d2i_ASN1_BIT_STRING’ from incompatible pointer type ossl_asn1.c: In function ‘decode_enum’: ossl_asn1.c:373: warning: passing argument 2 of ‘d2i_ASN1_ENUMERATED’ from incompatible pointer type ossl_asn1.c: In function ‘decode_null’: ossl_asn1.c:390: warning: passing argument 2 of ‘d2i_ASN1_NULL’ from incompatible pointer type ossl_asn1.c: In function ‘decode_obj’: ossl_asn1.c:407: warning: passing argument 2 of ‘d2i_ASN1_OBJECT’ from incompatible pointer type ossl_asn1.c: In function ‘decode_time’: ossl_asn1.c:435: warning: passing argument 2 of ‘d2i_ASN1_TIME’ from incompatible pointer type ossl_asn1.c: In function ‘ossl_asn1_get_asn1type’: ossl_asn1.c:503: warning: cast to pointer from integer of different size ossl_asn1.c: In function ‘ossl_asn1_decode0’: ossl_asn1.c:727: warning: passing argument 1 of ‘ASN1_get_object’ from incompatible pointer type ossl_ns_spki.c: In function ‘ossl_spki_initialize’: ossl_ns_spki.c:67: warning: passing argument 2 of ‘d2i_NETSCAPE_SPKI’ from incompatible pointer type ossl_ocsp.c: In function ‘ossl_ocspreq_initialize’: ossl_ocsp.c:114: warning: passing argument 2 of ‘d2i_OCSP_REQUEST’ from incompatible pointer type ossl_ocsp.c: In function ‘ossl_ocspres_initialize’: ossl_ocsp.c:321: warning: passing argument 2 of ‘d2i_OCSP_RESPONSE’ from incompatible pointer type ossl_pkcs7.c: In function ‘ossl_pkcs7si_new’: ossl_pkcs7.c:90: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_pkcs7.c: In function ‘DupPKCS7SignerPtr’: ossl_pkcs7.c:103: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_pkcs7.c: In function ‘ossl_pkcs7ri_new’: ossl_pkcs7.c:116: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_pkcs7.c: In function ‘DupPKCS7RecipientPtr’: ossl_pkcs7.c:129: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_pkey_dsa.c: In function ‘ossl_dsa_initialize’: ossl_pkey_dsa.c:141: warning: passing argument 1 of ‘PEM_ASN1_read_bio’ from incompatible pointer type ossl_pkey_dsa.c:141: warning: passing argument 4 of ‘PEM_ASN1_read_bio’ from incompatible pointer type ossl_pkey_dsa.c: In function ‘ossl_dsa_to_public_key’: ossl_pkey_dsa.c:313: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_x509attr.c: In function ‘ossl_x509attr_initialize’: ossl_x509attr.c:100: warning: passing argument 2 of ‘d2i_X509_ATTRIBUTE’ from incompatible pointer type ossl_x509ext.c: In function ‘ossl_x509ext_initialize’: ossl_x509ext.c:285: warning: passing argument 2 of ‘d2i_X509_EXTENSION’ from incompatible pointer type ossl_x509name.c: In function ‘ossl_x509name_initialize’: ossl_x509name.c:135: warning: passing argument 2 of ‘d2i_X509_NAME’ from incompatible pointer type ossl_x509revoked.c: In function ‘ossl_x509revoked_new’: ossl_x509revoked.c:48: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type ossl_x509revoked.c: In function ‘DupX509RevokedPtr’: ossl_x509revoked.c:64: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 [2010-10-20 10:50:17] make readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 [2010-10-20 11:48:12] make readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 [2010-10-20 15:30:53] make readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 [2010-10-20 17:19:27] make readline.c: In function ‘username_completion_proc_call’: readline.c:730: error: ‘username_completion_function’ undeclared (first use in this function) readline.c:730: error: (Each undeclared identifier is reported only once readline.c:730: error: for each function it appears in.) make[1]: *** [readline.o] Error 1 make: *** [all] Error 1 Can anyone help? I'm totally lost here…
That article i 2.5 years old. I wouldn't recommend following it. If you still wants to then you could try to rvm install Ruby 1.8.7. I've never heard of any compability issues between 1.8.6 and 1.8.7. I would instead recommend that you follow Setting up a Rails Development System on Mac OSX Snow Leopard and from there the regular Getting Started with Rails.