There is another way of making the "library_variable" accessible in unit1 without having to create another unit. You can find that method in the thread https://forum.lazarus.freepascal.org/index.php/topic,45707.msg323530.html#msg323530 (https://forum.lazarus.freepascal.org/index.php/topic,45707.msg323530.html#msg323530)
HTH.