kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #38244
Re: eeschema depends on libngspice.so instead of libngspice.so.0?
-
To:
"kicad-developers@xxxxxxxxxxxxxxxxxxx" <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Maciej Suminski <maciej.suminski@xxxxxxx>
-
Date:
Tue, 30 Oct 2018 23:17:32 +0100
-
Authentication-results:
spf=pass (sender IP is 188.184.36.46) smtp.mailfrom=cern.ch; lists.launchpad.net; dkim=none (message not signed) header.d=none;lists.launchpad.net; dmarc=bestguesspass action=none header.from=cern.ch;
-
Autocrypt:
addr=maciej.suminski@xxxxxxx; prefer-encrypt=mutual; keydata= xsBNBFKfmAwBCAC9tak+4mDO1WiNnAwegusPBMEdl+sV35XeaU4PGSt33mPSlXB2klamg4ih QUykvuWqNEg2KyTvCSKNfnHTpzeeFegEsIwWFdhbIc4uUAD6CHl4+uGTXQiMh1+IJkgLmwuD RCEx9mSKbdzzTKz05w+fzzT3mNfko8NICWlcmhFgo2RXnQRTqFg7CNNBpx4kr4+AWIvb+Rha AVMLVJj1s05+STGyFucu6sZmTmOC53ZtkV8HchJeGuQL0LPkjvX0VKGE3gkvuP4iLBcgFtNC Kcu/L6FmWd24m2IhWaHXoWLBiVFw7gGzUdB7gSAiNO1+SoWX+99rbud7RvqV49vOgoqbABEB AAHNKU1hY2llaiBTdW1pbnNraSA8bWFjaWVqLnN1bWluc2tpQGNlcm4uY2g+wsB5BBMBAgAj BQJSn5gMAhsDBwsJCAcDAgEGFQgCCQoLBBYCAwECHgECF4AACgkQFHAa7WGlsnU/JQf5AYW0 oFH+jOykZvlRkRZMoqw1vZGOHeRPK92vbjeiau/hALYX1FBvZMx+JMmVHN7DkRIY7bVoiJ6N n4Byn//BSd9F9eXjAphYVuBg2Xe5wp3/l9/z2Iw8KeLpfKAtfIybgpycvTuUxFIxm9mtpPt+ AoNFKBDhfLcpZLJTW7AwwpnzP+GDdjszjnW6rMt8Aq55liR+y/TZfz/tTEDcUcSPLlJBTmda TmkO5aPxPmeCeDMOT3YEd+bK57V5b7RgtqTdIT6CW7tjQKBPJbIGa8PQ0tUfz0yCBEPWghnY w+B/2JeArrRXDui78cGgTDy1ocQNAm3havk2WO2qykxziY6Owc7ATQRSn5gMAQgAxw+MRllT IPNnCeOAbRgX1KRzo7+7WpSIbmhrBzLY0O1SyIa7U05E6+4jDHDfDpSLqc61an1+M69e6l9Z E3ve3hymtj5ucXZQnveQ5klD6z5FBC/04of/YyrS+h6iRSM0nOmu1JOIqM0S2OzwsKRsS86r jCtRE5OxoBDCIB4xNPitezs4uvLoVfO3mVYUhiPRZMtTCInEi+tlM+AmaPjRkPAfhd0wsOjk oxkuJWEnZ8U8oHpeL0uqANZgLlIiT5yJMWsyyqlK01hdFbuIydIFFiyXJw1HDTXWX+tMxJrX VEvQJZALof9RU/jntqGltnQXArUgPMSGGu1f+7AH/CuMyQARAQABwsBfBBgBAgAJBQJSn5gM AhsMAAoJEBRwGu1hpbJ1maAH/RZPbvXaNIOouHZlnlkq/WORHxjkKfve+AbE62Ed8yFIwlAj tyZGKeEG9hDJl6f9BxDv+9qunTfWfXQuHxNIpdXstkxQIx4m043Kx3h7VdEmg53ybeGNgpvz BYk5HdgCH3yP6UbGNiel6xZOywmvpru3pEKNg4mJhzxm9JCG+djrvbRh+BZNOkDBgaSiCAuJ q6Ffo9Qk/qfl6Uim9G7GKSS4930ZQ2GoVObe+jXixOhWXFSDhGKX5meABmELJ9XTcW3Pp6XC 0KXOE2p0EHQPmFvXdU6OePI72jTgRzPJXRXbPkL0/NUfbZfxS/xnAG8jmODc2ufbtrvE2jPu INX35u4=
-
In-reply-to:
<2233603.mAOZkW7DrW@sbruens-linux.lcs.intern>
-
Openpgp:
preference=signencrypt
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:99
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0
Hi Stefan,
On 10/30/18 4:22 PM, Brüns, Stefan wrote:
[snip]
> Some inline comments:
>> diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt
>> index e56f3c849..cd4d0d78e 100644
>> --- a/eeschema/CMakeLists.txt
>> +++ b/eeschema/CMakeLists.txt
>> @@ -7,6 +7,15 @@ add_definitions( -DEESCHEMA )
>> if( KICAD_SPICE )
>> set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
>> +
>> + # Find out the exact libngspice file name
>> + get_filename_component( NGSPICE_REAL_PATH "${NGSPICE_LIBRARY}" REALPATH
>> ) + get_filename_component( NGSPICE_LIB_FILE "${NGSPICE_REAL_PATH}" NAME
>> ) +
>> + set_property( SOURCE sim/ngspice.cpp
>> + APPEND PROPERTY COMPILE_DEFINITIONS
>> + NGSPICE_LIB_FILE="${NGSPICE_LIB_FILE}"
>> + )
>> endif()
>> include_directories( BEFORE ${INC_BEFORE} )
>> @@ -359,7 +368,15 @@ target_link_libraries( eeschema_kiface
>> legacy_gal
>> ${wxWidgets_LIBRARIES}
>> ${GDI_PLUS_LIBRARIES}
>> + ${NGSPICE_LIBRARY}
>
> Likely duplicates the line below and probably breaks when NGSPICE_LIBRARY is
> unset
You are correct. I have noticed that as well and in the patch that has
been committed [1] NGSPICE_LIBRARY is linked only conditionally.
>> )
>>
>> +
>> +if( KICAD_SPICE )
>> + target_link_libraries( eeschema_kiface
>> + ${NGSPICE_LIBRARY}
>> + )
>> +endif()
>
> This does not achieve what you likely intended. At least on openSUSE, kicad is
> linked with the as-needed linker flag, discarding any symbols and libraries
> not actually linked to.
Good point, thank you sharing the information. Do you know how smart is
the linker when the flag is enabled? Is it enough to call a function
from libngspice in a part of code that is actually never executed? Do we
need to create a dedicated dummy executable and install it as well?
Kind regards,
Orson
> Kind regards,
>
> Stefan
1.
https://git.launchpad.net/kicad/commit/?id=b445b0fab28f7dd41273801d06d7705215c57c0f
Attachment:
signature.asc
Description: OpenPGP digital signature
References