Linux commands

Tuesday, December 27, 2022

LINK : fatal error LNK1104: cannot open file 'mfc120.lib'


Go to Below Microsoft provided link, and download the vc_mbcsmfc.exe for Visual studio 2013


 https://www.microsoft.com/en-us/download/details.aspx?id=40770

Wednesday, March 16, 2022

Enable dst in linux

 mv /etc/localtime /etc/localtime_orig

ln -s /usr/share/zoneinfo/America/Chicago  /etc/localtime

Wednesday, October 10, 2018

certutil.exe: function failed: SEC_ERROR_LEGACY_DATABASE: The certificate/key database is in an old, unsupported format



This issue is causing due to the path given for -d option


certutil.exe -A -n "My Server Cert" -t "P,," -i "C:\myfolder\server.cer" -d "C:\myfolder\"

change to 

certutil.exe -A -n "My Server Cert" -t "P,," -i "C:\myfolder\server.cer" -d .




Tuesday, August 28, 2018

unresolved external symbol __imp_ap_proxy_balancer_get_best_worker referenced in functio n find_best_bybusyness



ERROR:

mod_lbmethod_bybusyness.c.obj : error LNK2019: unresolved external symbol __imp_ap_proxy_balancer_get_best_worker referenced in functio
n find_best_bybusyness

mod_lbmethod_bybusyness.so : fatal error LNK1120: 1 unresolved externals
LINK failed. with 1120
NMAKE : fatal error U1077: '"C:\Program Files\CMake\bin\cmake.exe"' : return code '0xffffffff'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.


Solution

open build.make in below project path 

httpd-2.4.33\httpdbin\CMakeFiles\mod_lbmethod_bybusyness.dir\depend.make

search for link.exe and go to next line and add the mod_proxy.lib as shown below.
/out:mod_lbmethod_heartbeat.so /implib:mod_lbmethod_heartbeat.lib /pdb:C:\gitcode\httpd-2.4.34\httpdbin\mod_lbmethod_heartbeat.pdb /dll /version:0.0 /base:@C:/gitcode/httpd-2.4.34/httpdbin/BaseAddr.ref,mod_lbmethod_heartbeat.so /machine:x64 /INCREMENTAL:NO libhttpd.lib ..\srclib\apr\Release\lib\libapr-1.lib ..\srclib\apr-util\Release\lib\libaprutil-1.lib ws2_32.lib mswsock.lib ..\srclib\pcre\Release\lib\pcre.lib ws2_32.lib mswsock.lib kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib mod_proxy.lib 




Do the same for below files

httpd-2.4.34\httpdbin\CMakeFiles\mod_lbmethod_bytraffic.dir\build.make

httpd-2.4.34\httpdbin\CMakeFiles\mod_lbmethod_heartbeat.dir\build.make

Monday, May 21, 2018

configure: error: no acceptable ld found in $PATH


ld is not available in windows

there is alternative command for ld is link.exe in windows

Resolution

export LD=link.exe


Tuesday, May 15, 2018

fatal error C1189: #error : MFC does not support _WIN32_WINNT less than _WIN32_WINNT_WINXP


Please change the file stdAfx.h  as below


// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently

#pragma once

// Modify the following defines if you have to target a platform prior to the ones specified below.
// Refer to MSDN for the latest info on corresponding values for different platforms.
#ifndef WINVER // Allow use of features specific to Windows 95 and Windows NT 4 or later.
#define WINVER 0x0600 // Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
#endif

#ifndef _WIN32_WINNT // Allow use of features specific to Windows NT 4 or later.
#define _WIN32_WINNT 0x0600 // Change this to the appropriate value to target Windows 2000 or later.
#endif

#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later.
#define _WIN32_WINDOWS 0x0600 // Change this to the appropriate value to target Windows Me or later.
#endif

#ifndef _WIN32_IE // Allow use of features specific to IE 4.0 or later.
#define _WIN32_IE 0x0600 // Change this to the appropriate value to target IE 5.0 or later.
#endif

#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS // some CString constructors will be explicit

#include <afx.h>
#include <afxwin.h>
#include <afxmt.h> // for synchronization objects
#include <afxext.h>
//#include <afxisapi.h>

Tuesday, May 8, 2018

Visual studio 2013 error C2143: syntax error : missing ';' before 'nullptr'

func()
{
string nullptr;

}

Change the nullptr variable to another another name as below

func()
{
string nullptr123;

}

Then it resolves the issue.

Sunday, November 5, 2017

NSS is failed to communicate with Oracle Directory Server on cipher TLS_DHE_RSA_WITH_AES_128_CBC_SHA256



This is not a bug from NSS libs.

This issue is resolved by following change in ODSEE
Need to change the config in ODSEE

Add a New cipher suite as below.
enabled-ssl-cipher-suites:JRE


https://bugzilla.mozilla.org/show_bug.cgi?id=1366685. 

Tuesday, October 31, 2017

ld: fatal: file ./.libs/libpcre.so: wrong ELF class: ELFCLASS64

configure with --enable-utf8 --enable-unicode-properties --disable-cpp

./configure --prefix=/tmp/apache/pcre-8.41/Release/ --enable-utf8 --enable-unicode-properties --disable-cpp

Tuesday, September 5, 2017

fatal: File processing errors. No output written to .libs/htpasswd


Error 1:

fatal: File processing errors. No output written to .libs/htpasswd

This can be resovled by adding the below to ./configure command
--enable-static-htpasswd

Error 2:

ld: fatal: File processing errors. No output written to .libs/htdigest

This can be resovled by adding the below to ./configure command

--enable-static-htdigest


Error 3:
errors. No output written to .libs/httpd

best solution:
compile the expat library and provide the expat lib path to the configure command

provide the expat compiled libs to httpd(pa

./configure  --with-expat=/tmp/libexpat/Release/

checking the archiver (false) interface... unknown

it is unable to find the ar command, so set the path as below

set path
export PATH=/usr/ccs/bin:/usr/sbin:/usr/bin:/usr/sfw/bin:/usr/sfw/sbin:$PATH

Monday, June 19, 2017

ProviderTest.exe example

C:\Program Files (x86)\CA\erpconn\siebel\bin>ProviderTest.exe
Enter username: sadmin (username should authenticate and Authorization in User directory given in policies)
Enter password: sadmin (username should validated in User directory given in policies)
Testing provider with username 'sadmin' and password 'sadmin'
Loading library... OK
Finding entry point... OK
Enter Config File: C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf
Calling SecurityLogin()...OK
pUser is NULL
Provider test failed

ERR: SmAgentConnection::SetResource Agent API Error (No Connection)

Trouble shoot
restarted the policy server
corrected the config file C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf

correct conf file as below.
#ClusterThreshold=50
AgentName=agent
SharedSecret=****
Resource=/SiebelConnector/

testprovider correct output


C:\Program Files (x86)\CA\erpconn\siebel\bin>ProviderTest75.exe
Loading Security Adapter
OK
Security Adapter API Version is correct
Enter username: user1   (This is ldap user, not the siebel admin user)
Enter password: ****  
Testing provider with username 'user1' and password '****'
Enter Config File: C:\Siebel\8.1.1.14.0\ses\siebsrvr\BIN\SmSiebelSSO.conf
Calling SecurityLogin()...Number of roles to save is 0OK
Return code is OK
Test 1: SecurityGetUsername8()
        Username: user1
Test 2: SecurityGetAccountStatus8()
        Account state: ACTIVE
Test 3: SecurityGetCredentials8()
        pCred->m_pType: Test1
        pCred->m_pUsername: sadmin
        pCred->m_pPassword: 6 characters long
Test 4: GetUserInfo:
        m_accountStatus: ACTIVE
        m_bPasswordSet: 0
        m_pCredentialsArray
                #:       Type |   Username |   Password
                --------------+------------+-----------
                0:            |     sadmin |    6 chars
        No further credentials
        m_pNewUsername: (None)
        m_pPassword: (None)
Test 5: GetRoles()
        SecurityGetRoles8 returned SecurityErrOK
        Total: 0 roles

Friday, June 9, 2017

gmake[4]: ../../../config/./nsinstall: Command not found

solution:
If you start compilation with NSPR then this error will through 

so don't do first nspr build ,

Do NSS build only from nss folder.
cd nss
gmake BUILD_OPT=1 NSPR_INCLUDE_DIR=/root/nss/ USE_SYSTEM_ZLIB=1 ZLIB_LIBS=-lz nss_build_all

ld: fatal: Symbol referencing errors. No output written to libnspr4.so

Solution:
Go to nspr folder and Build nspr with 
./Configure

ld: fatal: library -lplc4: not found

ld: fatal: library -lplc4: not found
ld: fatal: library -lplds4: not found

Solution:
Goto 
nss-3.20/dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# ldd libplc4.so
ldd: libplc4.so: cannot open file: No such file or directory
bash-3.2# ls -ltr
total 112
drwxr-xr-x   3 root     root         185 Nov 10 11:53 cpu
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libnspr4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libnspr4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/pr/src/./libnspr4.so
lrwxrwxrwx   1 root     root          51 Nov 10 12:11 libplds4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.a
lrwxrwxrwx   1 root     root          52 Nov 10 12:11 libplds4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/ds/./libplds4.so
lrwxrwxrwx   1 root     root          56 Nov 10 12:11 libplc4.a -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.a
lrwxrwxrwx   1 root     root          57 Nov 10 12:11 libplc4.so -> ../../../nspr/SunOS5.10_DBG.OBJ/lib/libc/src/./libplc4.so

All are soft links here and soft links path are incorrect here. please copy the original so files created in below.
cd nss-3.20
bash-3.2# cp nspr/lib/libc/src/libplc4.so dist/SunOS5.10_DBG.OBJ/lib/
bash-3.2# cp nspr/lib/ds/libplds4.so dist/SunOS5.10_DBG.OBJ/lib/
cp nspr/pr/src/libnspr4.so dist/SunOS5.10_DBG.OBJ/lib/

configure: error: C compiler cannot create executables

Issue 2:
checking whether the C compiler works... no
configure: error: in `/home/kanmu03/nss-3.20/nspr':
configure: error: C compiler cannot create executables

Solution:
You need CC or gcc compiler when you compiling the NSS

We prefer the CC or cc compiler wich comes with solaris studio, you can download solaris studio from oracle site.

Un zip the solaris studio and set path to compiler CC or cc

export PATH=/usr/ccs/bin:/usr/sfw/bin:/opt/SolarisStudio12.3-solaris-sparc-bin/solarisstudio12.3/bin:$PATH

ld.so.1: certutil: fatal: libssl3.so: open failed: No such file or directory

Solution:
reinevm01: # ldd certutil
        libssl3.so =>    /lib/libssl3.so
        libsmime3.so => /lib/libsmime3.so
        libnss3.so =>    /lib/libnss3.so

check the symbolic link for the certuitl and add the lib path to LD_LIBRARY_PATH